Add string to the new schedule button sharing
This commit is contained in:
parent
b5c86f51ca
commit
1b93396315
2 changed files with 21 additions and 6 deletions
|
@ -300,16 +300,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)
|
||||||
|
|
||||||
msg = f"{interaction.user.mention} added a match to this channel!\n"
|
msg = strings.added_schedule(interaction.user.mention) + "\n"
|
||||||
msg += "Current scheduled matches are:"
|
msg += strings.scheduled_matches()
|
||||||
|
|
||||||
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)
|
msg += strings.scheduled(next_run, min)
|
||||||
msg += f"\n{date_str} with {min} members per group\n"
|
|
||||||
|
|
||||||
await interaction.channel.send(msg)
|
await interaction.channel.send(msg)
|
||||||
await interaction.response.send_message(content="Posted :)", ephemeral=True)
|
await interaction.response.send_message(
|
||||||
|
content=strings.acknowledgement(interaction.user.mention), ephemeral=True)
|
||||||
else:
|
else:
|
||||||
await interaction.response.send_message(content="No scheduled matches to post :(", ephemeral=True)
|
await interaction.response.send_message(content=strings.no_scheduled(), ephemeral=True)
|
||||||
|
|
|
@ -178,3 +178,18 @@ def matched_up(ms): return [
|
||||||
def thread_title(ms): return [
|
def thread_title(ms): return [
|
||||||
f"{format_list(ms)}",
|
f"{format_list(ms)}",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@randomised
|
||||||
|
def added_schedule(m): return [
|
||||||
|
f"{m} added a match to this channel!"
|
||||||
|
f"A matchy run was scheduled by {m}."
|
||||||
|
f"{m} scheduled a match in here :)"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@randomised
|
||||||
|
def scheduled_matches(): return [
|
||||||
|
"Current scheduled matches are:"
|
||||||
|
"I've got these scheduled matches right now:"
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue