ajout exeption quand le cog n'a pas de commandes
This commit is contained in:
parent
485a442583
commit
f6cd27e972
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue