Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
danydudiot committed Sep 13, 2024
2 parents 6159ecc + 800e091 commit 404bb92
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/MySlashCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,21 +304,3 @@ async def test_change(self, ctx: SlashContext) -> None:
file_prod.write(content)

await ctx.send("Le fichier ics à été modifier.", ephemeral=False)

@slash_command(name="info", description="Envoie des infos sur vos groupes, et filière. Si une personne est donnée, donne ses informations", default_member_permissions=Permissions.ADMINISTRATOR)
@slash_option(
name="personne",
description="Quel utilisateur ?",
required=False,
opt_type=OptionType.USER
)
async def info(self, ctx: SlashContext, personne: User = None):
"""Fonction qui permet d'afficher le nom, la filière et les groupes de la personne"""
author = ctx.author if (personne is None) else personne
you_are = personne is None
str_role = ""
for groupe in self.tool.get_groupes_as_list(author):
str_role += groupe.value + ", "
str_role = str_role.removesuffix(", ")
await ctx.send(
f"{"Vous êtes" if you_are else "Informations sur"} {author.display_name}!\n{"Votre" if you_are else "Sa"} filière est {self.tool.get_filiere_as_filiere(ctx.author).value} et {"vos" if you_are else "ses"} groupes {"sont" if len(self.tool.get_groupes_as_list(ctx.author)) > 1 else "est"} {str_role}.")

0 comments on commit 404bb92

Please sign in to comment.