Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ZRunner authored Feb 8, 2024
2 parents ff80ca9 + 3d17b8d commit e7c4081
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
Empty file added .scannerwork/.sonar_lock
Empty file.
6 changes: 6 additions & 0 deletions .scannerwork/report-task.txt
Original file line number Diff line number Diff line change
@@ -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
13 changes: 11 additions & 2 deletions fcts/help_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion fcts/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion fcts/tickets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e7c4081

Please sign in to comment.