Don't show commands to people who can't use them in !help
This commit is contained in:
parent
95747dbd36
commit
d2939b8dee
1 changed files with 2 additions and 1 deletions
1
bot.py
1
bot.py
|
@ -114,6 +114,7 @@ class Bot(commands.Bot):
|
||||||
async def help(self, ctx: commands.Context):
|
async def help(self, ctx: commands.Context):
|
||||||
message = "Available commands:"
|
message = "Available commands:"
|
||||||
for command in self.commands:
|
for command in self.commands:
|
||||||
|
if command not in ["addcmd", "removecmd"] or ctx.author.is_mod:
|
||||||
message += f" {PREFIX}{command}"
|
message += f" {PREFIX}{command}"
|
||||||
for command in self.db_cur.execute("SELECT command FROM custom_commands").fetchall():
|
for command in self.db_cur.execute("SELECT command FROM custom_commands").fetchall():
|
||||||
message += f" {PREFIX}{command[0]}"
|
message += f" {PREFIX}{command[0]}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue