1
0

fix: count typo

This commit is contained in:
オスカー、 2023-12-01 10:49:12 +09:00
parent 2061d53f7b
commit e9d15ba75f
No known key found for this signature in database
GPG Key ID: B1EFBBF5C93FF78F
2 changed files with 1 additions and 2 deletions

View File

@ -7,7 +7,6 @@ from mipa.ext.commands.bot import Bot
class Post(commands.Cog):
def __init__(self, bot: Bot) -> None:
self.bot = bot
self.max_count = bot.config.max or 3
self.visibility = bot.config.visibility or "home"
self.rate = bot.config.rate or 30
self.minute = bot.config.start_time or 0

View File

@ -88,7 +88,7 @@ class Autoposter(commands.Bot):
result = random.randint(1, count)
number = result + 2
self.posted.append(number)
if len(self.posted) > self.max_count:
if len(self.posted) > self.config.max:
self.posted.pop(0)
return await Line.from_number(number, sheet)