From 71f624e55d69dba638cc25e0c5ebce51858aff1e Mon Sep 17 00:00:00 2001 From: s0lst1ce Date: Mon, 2 Mar 2020 20:30:43 +0100 Subject: [PATCH] #18 fixed --- src/help.py | 10 ++++------ src/lang/help/help.en | 3 ++- src/lang/role/help.en | 2 +- src/lang/slapping/help.en | 5 +++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/help.py b/src/help.py index 17d3950..b37302a 100644 --- a/src/help.py +++ b/src/help.py @@ -114,15 +114,13 @@ async def start_interaction(self, pages: list, msg: discord.Message): break await msg.remove_reaction(reaction, user) - await msg.edit(suppress=True, embed=pages[current_page]) + await msg.edit(suppress=False, embed=pages[current_page]) elapsed_time = time() - start_time - # print("Seconds gone by:", elapsed_time) except TimeoutError: - # print("Time is over, deleting message") await msg.delete() async def send_bot_help(self, mapping): - pages = get_bot_pages(self.context.bot.cogs.values(), lang) + pages = get_bot_pages(self.context.bot.cogs.values(), self.get_help_lang()) msg = await self.get_destination().send(embed=pages[0]) await self.set_reactions(msg, len(pages)) @@ -154,7 +152,7 @@ def get_help(command, lang: str): """this needs heavy refactoring""" if command.cog: text = Translator( - command.cog.__module__.split(".")[1], lang, help_type=True + command.cog.__module__.split(".")[-1], lang, help_type=True )._dict if not command.parents: if isinstance(command, discord.ext.commands.Group): @@ -179,7 +177,7 @@ def get_help(command, lang: str): def get_bot_pages(cogs, lang: str): """currently doesn't support commands outside of cogs""" pages = [] - for commands in cogs: + for cog in cogs: pages += get_cog_pages(cog, lang, paginate = False) description = Translator("help", lang, help_type=True)._dict["description"] diff --git a/src/lang/help/help.en b/src/lang/help/help.en index 1df9e5a..db3193d 100644 --- a/src/lang/help/help.en +++ b/src/lang/help/help.en @@ -6,7 +6,8 @@ "poll": "This suite of commands provides automatic poll creation. A poll is an embed message sent by the bot to specified channels. Every user can react to the poll to show their opinion regarding the interrogation submitted by the poll. With each reaction, the poll's color will change to give everyone a quick visual feedback of all members' opinion. A poll is generated from a user's message. Currently it only supports messages from a poll channel. However it is planned to improve this to allow one to create a poll using a dedicated command. Same goes for poll editing which is yet unsupported. To palliate to this you can remove your poll if you consider it was malformed.", "embedding": "This extension allows any user to send a message as an embed. The color of the embed is defined by the user's role color.", "essentials": "This extension contains some of the most basic managing commands and should almost always be enabled.", - "developement": "Allows the developers to update the bot and notify all server owners of the changes. It also facilitates bug fixing by providing an easy way to retrieve the log.", + "development": "Allows the developers to update the bot and notify all server owners of the changes. It also facilitates bug fixing by providing an easy way to retrieve the log.", "config": "Allows the owner of a server to configure the behavior of the bot.", "defaults": "A suite of commands always activated which handle extension management. This cannot be unloaded as it is part of the core of the bot and is required for live updates." } + diff --git a/src/lang/role/help.en b/src/lang/role/help.en index 3174c1e..79b5177 100644 --- a/src/lang/role/help.en +++ b/src/lang/role/help.en @@ -2,5 +2,5 @@ "role": ["role management utility. Requires a Gestion role", { "add": ["Give roles to a member", " [roles...]` gives *roles* to *member*"], "rm": ["Remove roles from a member", " [roles...]` removes *roles* from *member*"] - }], + }] } \ No newline at end of file diff --git a/src/lang/slapping/help.en b/src/lang/slapping/help.en index 8108195..1295ad7 100644 --- a/src/lang/slapping/help.en +++ b/src/lang/slapping/help.en @@ -1,7 +1,8 @@ { "slap": ["Meant to give a warning to misbehavioring members. Cumulated slaps will result in warnings, role removal and eventually kick. Beware the slaps are logged throughout history.", " [reason...]` slaps `member` with `reason`"], - "forgive": ["Pardonning a member to reduce his slap count Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa..", " [nbr]` removes `nbr` slaps from `member`"], + "forgive": ["Pardonning a member to reduce his slap count.", " [nbr]` removes `nbr` slaps from `member`"], "slaps": ["Returns an embed representing the number of slaps of each member. More detailed info can be obtained if member arguments are provided.", "[members...]` returns a list denoting the number of times each slapped member has been slapped. If `members` is precised then detailed information about the slaps of these members will be displayed."], "spam": ["Can be used by anyone when they believe someone is spamming. One user can only report another once for the same spamming. Rules can be set for automatic moderation. A set amount of reports must be done for the counter-spamming rules to take effect.", "` raises spam counter for `member` by one."], - "abuse": ["Can be used by anyone. This allows users to report unruly behavior from another member. This will send a report card to a set moderation channel for the moderators to review. A explanation for the report must be provided.", " [reason...]` reports `member` because of `reason`"] + "abuse": ["Can be used by anyone. This allows users to report unruly behavior from another member. This will send a report card to a set moderation channel for the moderators to review. A explanation for the report must be provided.", " [reason...]` reports `member` because of `reason`"], + "mute": ["TBW", "`TBW"] } \ No newline at end of file