Skip to content

Commit

Permalink
chore: Release Articuno v5.0.4 (#39)
Browse files Browse the repository at this point in the history
Fix an error with `/help` command.
  • Loading branch information
B1ue-Dev authored May 9, 2023
2 parents 11dcccc + 0be9bcc commit 6c980df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
4 changes: 2 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def get_latest_release_version() -> str:
logging.basicConfig(
format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s",
datefmt="%d/%m/%Y %H:%M:%S",
level=0,
level=logging.INFO,
)

client = interactions.Client(
Expand Down Expand Up @@ -97,7 +97,7 @@ async def on_startup() -> None:
_ _
/\ | | (_)
/ \ _ __| |_ _ ___ _ _ _ __ ___
/ /\ \ | '__| __| |/ __| | | | '_ \ / _ \
/ /\ \ | '__| __| |/ __| | | | '_ \ / _ \\
/ ____ \| | | |_| | (__| |_| | | | | (_) |
/_/ \_\_| \__|_|\___|\__,_|_| |_|\___/
Expand Down
32 changes: 20 additions & 12 deletions exts/core/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def help(self, ctx: interactions.SlashContext) -> None:
self.client.application_commands
):
if isinstance(command, interactions.SlashCommand):
if i == 15:
if i == 10:
help_list.append(embed)
i = 0
embed = interactions.Embed(
Expand All @@ -44,18 +44,26 @@ async def help(self, ctx: interactions.SlashContext) -> None:
),
)

if command.sub_cmd_name is None:
embed.add_field(
name=f"/{command.name}", value=command.description
embed.add_field(
name=f"/{command.name}"
+ (
f" {command.group_name}"
if str(command.group_name) != "None"
else ""
)
else:
if str(command.sub_cmd_name) != "None":
embed.add_field(
name=f"/{command.name} {command.sub_cmd_name}",
value=f"{command.sub_cmd_description}",
)

+ (
f" {command.sub_cmd_name}"
if str(command.sub_cmd_name) != "None"
else ""
),
value=f"{command.sub_cmd_description}"
if str(command.sub_cmd_name) != "None"
else f"{command.description}",
)
i += 1

paginator = Paginator.create_from_embeds(self.client, *help_list)
paginator = Paginator.create_from_embeds(
self.client, *help_list, timeout=30
)
print(help_list)
await paginator.send(ctx)

0 comments on commit 6c980df

Please sign in to comment.