From daed469994300b53b22fab9c344cacc1d93953b9 Mon Sep 17 00:00:00 2001 From: Romain J Date: Wed, 8 Apr 2020 00:26:26 +0200 Subject: [PATCH] fix(command): fix help spam --- cogs/basics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/basics.py b/cogs/basics.py index 3aa412a..d0fa175 100755 --- a/cogs/basics.py +++ b/cogs/basics.py @@ -58,13 +58,13 @@ class Basics(commands.Cog): """---------------------------------------------------------------------""" @commands.command() - async def help(self, ctx): + async def help(self, ctx, page: int = 1): """Affiches l'aide du bot""" + page = int(page) if 0 < int(page) < 5 else 1 text = open('texts/help.md').read().split("[split]") - for txt in text: - em = discord.Embed(title='Commandes de TuxBot', description=txt, + em = discord.Embed(title='Commandes de TuxBot', description=text[page - 1], colour=0x89C4F9) - await ctx.send(embed=em) + await ctx.send(content=f"page {page}/{len(text)}", embed=em) def setup(bot):