From 84e24d7e9d786b2f3dd76740536fd1c3520a111d Mon Sep 17 00:00:00 2001 From: Fixator10 Date: Wed, 9 Dec 2020 23:35:40 +0400 Subject: [PATCH] trigger typing only if bot has access to send messages (#192) --- chatchart/chatchart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatchart/chatchart.py b/chatchart/chatchart.py index cd172c2..44d3357 100644 --- a/chatchart/chatchart.py +++ b/chatchart/chatchart.py @@ -135,7 +135,8 @@ class Chatchart(commands.Cog): description=f"This might take a while...\n{history_counter}/{messages} messages gathered", colour=await self.bot.get_embed_colour(location=channel), ) - await channel.trigger_typing() + if channel.permissions_for(ctx.guild.me).send_messages: + await channel.trigger_typing() try: await em.edit(embed=new_embed) except discord.NotFound: