Update the schedule button to properly reply to the user
This commit is contained in:
parent
9d920ce831
commit
cc8490f38f
1 changed files with 5 additions and 5 deletions
|
@ -284,16 +284,16 @@ class ScheduleButton(discord.ui.Button):
|
||||||
|
|
||||||
tasks = state.State.get_channel_match_tasks(interaction.channel.id)
|
tasks = state.State.get_channel_match_tasks(interaction.channel.id)
|
||||||
|
|
||||||
interaction.channel.send(
|
msg = f"{interaction.user.mention} added a match to this channel!\n"
|
||||||
f"User {interaction.user.mention} added a match to this channel!\n\n"
|
msg += "Current scheduled matches are:"
|
||||||
+ "Current scheduled matches are:")
|
|
||||||
|
|
||||||
if tasks:
|
if tasks:
|
||||||
for (day, hour, min) in tasks:
|
for (day, hour, min) in tasks:
|
||||||
next_run = util.get_next_datetime(day, hour)
|
next_run = util.get_next_datetime(day, hour)
|
||||||
date_str = util.datetime_as_discord_time(next_run)
|
date_str = util.datetime_as_discord_time(next_run)
|
||||||
msg = f"{date_str} with {min} members per group\n"
|
msg += f"\n{date_str} with {min} members per group\n"
|
||||||
|
|
||||||
interaction.channel.send(msg)
|
await interaction.channel.send(msg)
|
||||||
|
await interaction.response.send_message(content="Posted :)", ephemeral=True)
|
||||||
else:
|
else:
|
||||||
await interaction.response.send_message(content="No scheduled matches to post :(", ephemeral=True)
|
await interaction.response.send_message(content="No scheduled matches to post :(", ephemeral=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue