diff options
author | 2021-06-23 10:15:53 +0200 | |
---|---|---|
committer | 2021-06-23 10:15:53 +0200 | |
commit | 7386c17b3d28aed03964fdfef84e964da6c10b93 (patch) | |
tree | 15001d2af21b4253de849e86e8fe967df9ae560e | |
parent | Merge pull request #1648 from python-discord/voice-verify-pings (diff) | |
parent | Update bot/exts/utils/bot.py (diff) |
Merge pull request #1656 from python-discord/swfarnsworth/echo_permissions
Prevent one from using the `!echo` command for a channel in which one can't speak
-rw-r--r-- | bot/exts/utils/bot.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/utils/bot.py b/bot/exts/utils/bot.py index a4c828f95..d84709616 100644 --- a/bot/exts/utils/bot.py +++ b/bot/exts/utils/bot.py @@ -44,6 +44,8 @@ class BotCog(Cog, name="Bot"): """Repeat the given message in either a specified channel or the current channel.""" if channel is None: await ctx.send(text) + elif not channel.permissions_for(ctx.author).send_messages: + await ctx.send("You don't have permission to speak in that channel.") else: await channel.send(text) |