Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Fix when cmd to hinder is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskDuck committed May 18, 2024
1 parent dfd13b0 commit 0eb364d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _orangcbot/extensions/testing_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ async def hinder(self, ctx: commands.Context, cmd: str):
await ctx.send("I did not expect you to be such a fool")
else:
command = self._bot.get_command(cmd)
if command is None:
await ctx.send("Command not found.")
return
command.enabled = not command.enabled
await ctx.send("Request satisfied, master.")

Expand Down

0 comments on commit 0eb364d

Please sign in to comment.