Skip to content

Commit

Permalink
Add help for the pub bot
Browse files Browse the repository at this point in the history
  • Loading branch information
trickeydan committed Sep 30, 2024
1 parent 5b3f0af commit 397ae15
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kmibot/modules/pub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def on_scheduled_event_update(
old_event: discord.ScheduledEvent,
new_event: discord.ScheduledEvent,
) -> None:
if event_is_pub(new_event):
if event_is_pub(old_event):
await self.handle_pub_event_change(client, old_event, new_event)

async def on_scheduled_event_user_add(
Expand Down
21 changes: 21 additions & 0 deletions kmibot/modules/pub/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,24 @@ async def table(self, interaction: discord.Interaction, table_number: int) -> No
),
view=get_pub_buttons_view(pub),
)

@command(description="Get info on how to use the /pub command.") # type: ignore[arg-type]
async def help(self, interaction: discord.Interaction) -> None: # noqa: A003
LOGGER.info(f"{interaction.user} used /pub next")
assert interaction.guild is not None

await interaction.response.send_message(
"\n".join(
[
"I manage the pub events, and keep data up to date between systems.",
"Please don't edit the pub events manually, it confuses me!",
"Some people have auto opt-in for pub events, so use me to notify people of changes",
"",
"**Commands**",
"/pub next - create the next pub event, if needed",
"/pub table <table_no> - add the table number and let others know",
"/pub change - move the location of the pub and ping all attendees.",
],
),
ephemeral=True,
)

0 comments on commit 397ae15

Please sign in to comment.