Skip to content

Commit

Permalink
Only trigger concurrency message on command
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Dec 2, 2021
1 parent 33217b5 commit 77dea6f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ async def on_message(self, message: discord.Message):
await self.process_commands(message)

async def invoke(self, ctx):
if ctx.command and (
ctx.command.name in {"admin", "jishaku"}
or (ctx.command.root_parent and ctx.command.root_parent.name in {"admin", "jishaku"})
if ctx.command is None:
return

if ctx.command.name in {"admin", "jishaku"} or (
ctx.command.root_parent and ctx.command.root_parent.name in {"admin", "jishaku"}
):
return await super().invoke(ctx)

Expand Down

0 comments on commit 77dea6f

Please sign in to comment.