diff --git a/commandes/gitlab_integration.py b/commandes/gitlab_integration.py index 74ac655..d9569b9 100644 --- a/commandes/gitlab_integration.py +++ b/commandes/gitlab_integration.py @@ -111,7 +111,15 @@ class GitLabIntegration(commands.Cog): await inter.response.send_modal(modal=FeatureModal(self)) # ---------- Slash command: /signaler_bug ---------- - @commands.slash_command(name="signaler_bug", description="Signaler un bug du projet") + @commands.slash_command(name="notify_deploy", description="Envoyer un DM de confirmation du déploiement") + async def notify_deploy(self, inter: disnake.ApplicationCommandInteraction): + """DM the user that the deployment is done.""" + try: + await inter.author.send("✅ C'est fait ! Le code a été déployé sur la branche `main`.") + await inter.response.send_message("✅ DM de confirmation envoyé.", ephemeral=True) + except disnake.HTTPException: + await inter.response.send_message("⚠️ Impossible d'envoyer le DM (DMs désactivés).", ephemeral=True) + async def signaler_bug(self, inter: disnake.ApplicationCommandInteraction): await inter.response.send_modal(modal=BugModal(self))