From 58a5b6b8fd81f833ba3644c58298926c4036f580 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 11 Dec 2020 11:58:31 +0100 Subject: [PATCH] ajout exeption quand le cog n'a pas de commandes --- cogs/help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/help.py b/cogs/help.py index b761752..316717b 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -27,7 +27,7 @@ class Help(commands.Cog): if not cmds.hidden: liste_cmds += f", `{ctx.prefix}{cmds.name}`" 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) cmds_desc = '' for y in self.client.walk_commands():