From e13f037f1b26e62c0555a6b143a53797e553caa9 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Wed, 1 Jul 2020 03:01:04 +0100 Subject: [PATCH] Adding more commentary Adding a second parameter --- cogs/HelpMenu.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cogs/HelpMenu.py b/cogs/HelpMenu.py index 8def2cd2..ca913b06 100644 --- a/cogs/HelpMenu.py +++ b/cogs/HelpMenu.py @@ -248,20 +248,24 @@ class HelpMenu(menus.Menu): # Do nothing if the check does not return true if not check(self.ctx): return - # Allow the page number to be decreased + # Allow the page number to be increased else: # Set self.i to (i + 1) remainder length of the array self.i = (self.i + 1) % len(embeds(self)) next_page = embeds(self)[self.i] + # Send the embed and remove the reaction of the user await self.message.edit(embed=next_page) await self.message.remove_reaction("➡", self.ctx.author) @menus.button('\N{BLACK SQUARE FOR STOP}\ufe0f') async def on_stop(self, payload): + # Send the stop embed which shows that the help commands embed is no longer accessible stop = stop_embed(self) await self.message.edit(embed=stop) + + # Clear the reactions in the message and stop the function await self.message.clear_reactions() self.stop()