18 lines
661 B
Python
18 lines
661 B
Python
|
|
import discord
|
||
|
|
from discord import app_commands
|
||
|
|
from discord.ext import commands
|
||
|
|
import random
|
||
|
|
|
||
|
|
class FunCommands(commands.Cog):
|
||
|
|
def __init__(self, bot):
|
||
|
|
self.bot = bot
|
||
|
|
self.emojis = ['😀', '😂', '😎', '😍', '😡', '🤖', '👻', '🎉', '🔥', '🌈', '🍕', '🍔', '🍟', '🚀', '🌟']
|
||
|
|
|
||
|
|
@app_commands.command(name="fun", description="Envoie 10 emojis fun aléatoires")
|
||
|
|
async def fun(self, interaction: discord.Interaction):
|
||
|
|
chosen_emojis = random.sample(self.emojis, 10)
|
||
|
|
await interaction.response.send_message(" ".join(chosen_emojis))
|
||
|
|
|
||
|
|
async def setup(bot):
|
||
|
|
await bot.add_cog(FunCommands(bot))
|