mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Add commands for deadlines
This commit is contained in:
parent
693fab7833
commit
fccf4efa1f
10 changed files with 183 additions and 3 deletions
|
|
@ -44,6 +44,7 @@ def format_command_usage(ctx: Context) -> str:
|
|||
|
||||
def format_slash_command_usage(interaction: SlashInteraction) -> str:
|
||||
# Create a string with the options used
|
||||
# TODO look into the format used by the lib because it's terrible
|
||||
options = " ".join(list(map(
|
||||
lambda option: f"{option.name}: \"{option.value}\"",
|
||||
interaction.data.options.values()
|
||||
|
|
@ -51,3 +52,7 @@ def format_slash_command_usage(interaction: SlashInteraction) -> str:
|
|||
|
||||
command = f"{interaction.slash_command.name} {options or ''}"
|
||||
return f"{interaction.author.display_name} in {_format_error_location(interaction)}: /{command}"
|
||||
|
||||
|
||||
def get_edu_year(index: int) -> str:
|
||||
return ["1ste Bachelor", "2de Bachelor", "3de Bachelor", "1ste Master", "2de Master"][index - 1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue