diff --git a/cogs/cog_fun.py b/cogs/cog_fun.py index aa8c09e..3893bd3 100644 --- a/cogs/cog_fun.py +++ b/cogs/cog_fun.py @@ -13,7 +13,7 @@ class Fun(MyCog): self.bot = bot @app_commands.command(name="chuchoter") - async def chuchoter(self, interaction: discord.Interaction, channel: discord.TextChannel, message: str): + async def chuchoter(self, interaction: discord.Interaction, message: str, channel: discord.TextChannel=None): """ Chuchote à Staticky un message qu'il partagera (attention ne lui faites pas aveuglément confiance) :param interaction: discord interaction @@ -21,6 +21,9 @@ class Fun(MyCog): :param message: Message à partagerE """ try: + if channel is None: + channel = interaction.channel + to_send = f"**Quelqu'un m'a chuchoté :** \"{message}\"" if random.randint(1, 6) == 1: to_send += f"\nJe balance, c'est {interaction.user.mention} !"