ajout exeption quand le cog n'a pas de commandes
This commit is contained in:
parent
329329c8a5
commit
58a5b6b8fd
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class Help(commands.Cog):
|
||||||
if not cmds.hidden:
|
if not cmds.hidden:
|
||||||
liste_cmds += f", `{ctx.prefix}{cmds.name}`"
|
liste_cmds += f", `{ctx.prefix}{cmds.name}`"
|
||||||
nb_cmds += 1
|
nb_cmds += 1
|
||||||
if name_cog != "Help":
|
if name_cog != "Help" and nb_cmds > 0:
|
||||||
halp.add_field(name = f'**{name_cog} — {nb_cmds}**', value = liste_cmds[2:], inline = False)
|
halp.add_field(name = f'**{name_cog} — {nb_cmds}**', value = liste_cmds[2:], inline = False)
|
||||||
cmds_desc = ''
|
cmds_desc = ''
|
||||||
for y in self.client.walk_commands():
|
for y in self.client.walk_commands():
|
||||||
|
|
Reference in a new issue