From 340af984ae820fa774eb83a9c1c21933659792fd Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 15 Dec 2024 17:09:18 +0100 Subject: [PATCH] =?UTF-8?q?Corrige=20la=20gestion=20de=20l'ID=20de=20la=20?= =?UTF-8?q?guilde=20dans=20la=20fonction=20say=20pour=20=C3=A9viter=20les?= =?UTF-8?q?=20erreurs=20lorsque=20la=20guilde=20est=20None.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main-bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-bot.py b/main-bot.py index f5ac5c7..4972217 100644 --- a/main-bot.py +++ b/main-bot.py @@ -47,7 +47,7 @@ async def on_message(message:discord.Message): @app_commands.allowed_contexts(guilds=True,dms=True,private_channels=True) @app_commands.allowed_installs(guilds=True,users=True) async def say(interaction:discord.Interaction,id:str,message:str): - if not await say_message(interaction.user.id,interaction.guild.id,id,message,interaction.channel): + if not await say_message(interaction.user.id,(interaction.guild.id if interaction.guild is not None else -1),id,message,interaction.channel): print("ok9") await interaction.response.send_message("Vous n'avez pas ce personnage",ephemeral=True) return