Cog fun added

- Command "chuchoter" added
This commit is contained in:
voXrey 2023-12-17 16:57:18 +01:00
parent 19b1f0eeea
commit c4b81297be
1 changed files with 26 additions and 0 deletions

26
cogs/cog_fun.py Normal file
View File

@ -0,0 +1,26 @@
import discord
from discord import app_commands
from discord.app_commands import Choice
from discord.ext import commands
from classes.my_cog import MyCog
class Fun(MyCog):
def __init__(self, bot):
super().__init__(bot)
self.bot = bot
@app_commands.command(name="chuchoter")
async def chuchoter(self, interaction: discord.Interaction, channel: discord.TextChannel, message: str):
""" Chuchote à Staticky un message qu'il partagera """
try:
await channel.send(f"*Quelqu'un m'a chuchoter :*\n>>> {message}")
await interaction.response.send_message(f"Message envoyé dans {channel.mention}\n>>> {message}",
ephemeral=True)
except:
await interaction.response.send_message(f"Le message n'a pas pu être envoyé...", ephemeral=True)
async def setup(bot):
await bot.add_cog(Fun(bot))