From 9856533db3cc79281469c6cfd1fc4a90a8e756d1 Mon Sep 17 00:00:00 2001 From: "green." <41323182+greeeen-dev@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:41:59 +0200 Subject: [PATCH] in case we need these --- cogs/sysmgr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogs/sysmgr.py b/cogs/sysmgr.py index 7d5448ba..6dfa31bc 100644 --- a/cogs/sysmgr.py +++ b/cogs/sysmgr.py @@ -341,6 +341,10 @@ async def handle(self, ctx, error): await ctx.send(f'{self.bot.ui_emojis.error} {error}') elif isinstance(error, commands.CheckFailure): await ctx.send(f'{self.bot.ui_emojis.error} You do not have permissions to run this command.') + elif isinstance(error, commands.NoPrivateMessage): + await ctx.send(f'{self.bot.ui_emojis.error} You can only run this command in servers.') + elif isinstance(error, commands.PrivateMessageOnly): + await ctx.send(f'{self.bot.ui_emojis.error} You can only run this command in DMs.') elif isinstance(error, commands.CommandOnCooldown): t = int(error.retry_after) await ctx.send(f'{self.bot.ui_emojis.error} You\'re on cooldown. Try again in **{t // 60}** minutes and **{t % 60}** seconds.')