From d2939b8dee1064425f144b6b28d7e6f6ae93ee2a Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Sun, 18 Sep 2022 22:53:40 -0400 Subject: [PATCH] Don't show commands to people who can't use them in !help --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index d5ce749..6ebfdb0 100644 --- a/bot.py +++ b/bot.py @@ -114,7 +114,8 @@ class Bot(commands.Bot): async def help(self, ctx: commands.Context): message = "Available commands:" for command in self.commands: - message += f" {PREFIX}{command}" + if command not in ["addcmd", "removecmd"] or ctx.author.is_mod: + message += f" {PREFIX}{command}" for command in self.db_cur.execute("SELECT command FROM custom_commands").fetchall(): message += f" {PREFIX}{command[0]}" await ctx.send(message)