Fix missing await

This commit is contained in:
2020-12-19 13:27:55 +01:00
parent 812bacfa4e
commit 2504a65b61

1
bot.py
View File

@@ -124,6 +124,7 @@ async def random_message_command(ctx: commands.Context, channel: Optional[discor
messages = async_filter(_is_message_allowed_for_operations, channel.history(limit=max_cnt)) messages = async_filter(_is_message_allowed_for_operations, channel.history(limit=max_cnt))
messages = [item async for item in messages] messages = [item async for item in messages]
if not messages: if not messages:
await typing
await ctx.channel.send("No valid messages found!") await ctx.channel.send("No valid messages found!")
return return
msg: discord.Message = random.choice(messages) msg: discord.Message = random.choice(messages)