From 3bd8a5ecc0bb7c484646cda4d54c082b18b7a3b6 Mon Sep 17 00:00:00 2001 From: ZRunner Date: Mon, 13 Feb 2023 13:34:47 -0500 Subject: [PATCH 1/9] fix(admin): update command --- .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 .scannerwork/.sonar_lock create mode 100644 .scannerwork/report-task.txt diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 000000000..e69de29bb diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 000000000..406f32d31 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=ZRunner_ZBot_AYcZirM5nIdtIeElAWF2 +serverUrl=https://sonarqube.zrunner.me +serverVersion=9.9.0.65466 +dashboardUrl=https://sonarqube.zrunner.me/dashboard?id=ZRunner_ZBot_AYcZirM5nIdtIeElAWF2 +ceTaskId=AYgGZmhdv7TdYLyrmHUq +ceTaskUrl=https://sonarqube.zrunner.me/api/ce/task?id=AYgGZmhdv7TdYLyrmHUq From e9850439999a9040f36396eddeaebadfd9b141cc Mon Sep 17 00:00:00 2001 From: ZRunner Date: Sat, 18 Feb 2023 16:39:29 -0500 Subject: [PATCH 2/9] fix(help): not working in DMs --- fcts/help_cmd.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fcts/help_cmd.py b/fcts/help_cmd.py index 728162da8..677ec25fb 100644 --- a/fcts/help_cmd.py +++ b/fcts/help_cmd.py @@ -62,7 +62,16 @@ async def help_cmd(self, ctx: MyContext, *, args: Optional[str]=None): pass except Exception as err: self.bot.dispatch("error", err, ctx) - await ctx.send_super_help(args or None) + if len(args) == 0: + await self._default_help_command(ctx) + else: + await self._default_help_command(ctx, args) + + async def should_dm(self, context: MyContext) -> bool: + "Check if the answer should be sent in DM or in current channel" + if context.guild is None or not self.bot.database_online: + return False + return await self.bot.get_config(context.guild.id, 'help_in_dm') async def help_command(self, ctx: MyContext, command_arg: list[str]): """Main command for the creation of the help message From 15d194a276d04ff21a3e0815dc7361b3b804753e Mon Sep 17 00:00:00 2001 From: ZRunner Date: Sat, 18 Feb 2023 18:38:05 -0500 Subject: [PATCH 3/9] feat(tickets): add `tickets review-config` cmd --- fcts/tickets.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fcts/tickets.py b/fcts/tickets.py index 506ed7afc..20ac0bc53 100644 --- a/fcts/tickets.py +++ b/fcts/tickets.py @@ -769,7 +769,6 @@ async def portal_review_config(self, ctx: MyContext, *, topic_id: Optional[int]= @portal_review_config.autocomplete("topic_id") async def portal_review_autocomplete(self, interaction: discord.Interaction, current: str): return await self.topic_id_autocompletion(interaction, current, allow_other=False) - async def review_all(self, ctx: MyContext): "Send a global recap of a guild settings" topics = await self.db_get_topics(ctx.guild.id) From 2e67207aa50f9a540d81b7f4c84c9285106f140f Mon Sep 17 00:00:00 2001 From: ZRunner Date: Tue, 21 Feb 2023 20:49:02 -0500 Subject: [PATCH 4/9] refract(rss): cap list to 10 feeds/page --- fcts/rss.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fcts/rss.py b/fcts/rss.py index 07f76a522..98ef1fb4c 100644 --- a/fcts/rss.py +++ b/fcts/rss.py @@ -564,7 +564,6 @@ async def get_page_count(self) -> int: if length == 0: return 1 return ceil(length / feeds_per_page) - async def get_page_content(self, interaction, page): "Create one page" embed = discord.Embed(title=title, color=rss_cog.embed_color, timestamp=ctx.message.created_at) From aa2b2def685fea34521cd2b4312499ef6608a382 Mon Sep 17 00:00:00 2001 From: Z_runner Date: Wed, 22 Feb 2023 16:20:27 -0500 Subject: [PATCH 5/9] New Crowdin updates (#47) * Update source file en.json * Update source file en.json From 87f8622675663ffaeaf1e1eae6b1dab137c8f394 Mon Sep 17 00:00:00 2001 From: ZRunner Date: Wed, 8 Mar 2023 20:03:52 -0500 Subject: [PATCH 6/9] feat(lint): cleanup all files --- fcts/help_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcts/help_cmd.py b/fcts/help_cmd.py index 677ec25fb..740b0d8e9 100644 --- a/fcts/help_cmd.py +++ b/fcts/help_cmd.py @@ -66,7 +66,7 @@ async def help_cmd(self, ctx: MyContext, *, args: Optional[str]=None): await self._default_help_command(ctx) else: await self._default_help_command(ctx, args) - + async def should_dm(self, context: MyContext) -> bool: "Check if the answer should be sent in DM or in current channel" if context.guild is None or not self.bot.database_online: From 97b073cf9b4143f2abd0dfa8489d103f29b10dd5 Mon Sep 17 00:00:00 2001 From: Z_runner Date: Thu, 9 Mar 2023 13:44:54 -0500 Subject: [PATCH 7/9] Update source file en.json (#50) From 7f9f02b46122916e9797a9e058756f6bb07dd692 Mon Sep 17 00:00:00 2001 From: Z_runner Date: Mon, 13 Feb 2023 13:04:56 -0500 Subject: [PATCH 8/9] V4.3.0 (#45) * fix(readme): dead badge * fix(stats): merge failure * feat(antiscam): improve regex matching * feat(antiscam): improve training logs * fix(check): config reset bypass ignored guilds * fix(rss): DM commands + no tweet found * refract(stats): remove statuspage RAM usage * fix(yt): new youtube channel URL * refract(xp): better logs * fix(antiscam): regex replacement * feat(antiscam): improve training/saving process * fix(roles-react): deleted custom emoji * refract(tokens): improve credentials fetching * fix(top.gg): API stats posting for axobot * refract: rename Zbot class to Axobot * refract(doc): rename Zbot to Axobot in doc * refract(errors): variable name * fix(args): circular import * fix(logs): message update with pin/unpin * fix(twitch): log when loop fails * fix(help): config fetching * feat(serverconfig): 1st version of the new system * feat(serverconfig): update every config call * fix(serverconfig): xp stats * refract(alias): avoid using ctx.invoke * feat(doc): refresh documentation * feat(doc): use spinx book theme * fix(doc): references and tocdepth * fix(doc): dependencies list * feat(doc): v4.3.0 * feat(config): french translations * feat(modlogs): add msg creation time when deleted * fix(find): rss with NUL date * fix(error): slash command name * fix(logs): difference between nick and username * New Crowdin updates (#44) * Update source file en.json * Update source file en.json * Update source file en.json * feat(actions): upgrade to checkout v3 --- docs/conf.py | 1 - docs/requirements.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8269e7a57..85fe36c13 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,6 @@ _documentation_name = "Axobot Documentation" - # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. diff --git a/docs/requirements.txt b/docs/requirements.txt index b0f1df6a6..f300a95c0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,4 @@ sphinx sphinxext-opengraph>=0.6 sphinx_book_theme -sphinx_design \ No newline at end of file +sphinx_design From 3d17b8dff5d09bf5e7d90df64ce157a2059cb78c Mon Sep 17 00:00:00 2001 From: ZRunner Date: Thu, 13 Jul 2023 14:58:46 -0400 Subject: [PATCH 9/9] fix(rebase): remove duplicated method --- fcts/help_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fcts/help_cmd.py b/fcts/help_cmd.py index 740b0d8e9..ea6212621 100644 --- a/fcts/help_cmd.py +++ b/fcts/help_cmd.py @@ -73,7 +73,7 @@ async def should_dm(self, context: MyContext) -> bool: return False return await self.bot.get_config(context.guild.id, 'help_in_dm') - async def help_command(self, ctx: MyContext, command_arg: list[str]): + async def help_command(self, ctx: MyContext, commands_arg: Optional[list[str]] = None): """Main command for the creation of the help message If the bot can't send the new command format, it will try to send the old one.""" # if user entered a category name