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 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/fcts/help_cmd.py b/fcts/help_cmd.py index 728162da8..ea6212621 100644 --- a/fcts/help_cmd.py +++ b/fcts/help_cmd.py @@ -62,9 +62,18 @@ 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]): + 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 diff --git a/fcts/rss.py b/fcts/rss.py index a971513e0..91d7e3be3 100644 --- a/fcts/rss.py +++ b/fcts/rss.py @@ -567,7 +567,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) diff --git a/fcts/tickets.py b/fcts/tickets.py index b029a574a..4272e7d2f 100644 --- a/fcts/tickets.py +++ b/fcts/tickets.py @@ -810,7 +810,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)