diff --git a/botbotbot/__main__.py b/botbotbot/__main__.py index 15b8308..d3dd071 100644 --- a/botbotbot/__main__.py +++ b/botbotbot/__main__.py @@ -81,12 +81,12 @@ async def ai_reply(message): await message.reply(answer) -async def react(message): +async def react(message: discord.Message) -> None: await message.add_reaction(random.choice(message.guild.emojis)) @bot.listen("on_message") -async def on_message(message): +async def on_message(message: discord.Message) -> None: if message.flags.ephemeral: return @@ -105,7 +105,9 @@ async def on_message(message): @bot.listen("on_reaction_add") -async def add_more_reaction(reaction, user): +async def add_more_reaction( + reaction: discord.Reaction, user: discord.Member | discord.User +) -> None: if random.random() < 50 / 100: logger.info(f"Copy reaction from {user}") await reaction.message.add_reaction(reaction.emoji) @@ -123,7 +125,7 @@ async def react_message_edit(before: discord.Message, after: discord.Message) -> @bot.listen("on_message") -async def rando_shuffle(message): +async def rando_shuffle(message: discord.Message) -> None: if not message.flags.ephemeral and random.random() < 5 / 100 and message.guild: logger.info(f"Message shuffle after message from {message.author}") await try_shuffle(message.guild)