parent
19b1f0eeea
commit
c4b81297be
|
@ -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))
|
Loading…
Reference in New Issue