mirror of
https://github.com/dizedev/Main-tech.git
synced 2026-09-16 21:58:48 +00:00
22 lines
650 B
Python
22 lines
650 B
Python
import asyncio
|
|
import random
|
|
import disnake
|
|
from disnake.ext import commands
|
|
|
|
|
|
class CoinsCommand(commands.Cog):
|
|
def __init__(self, bot):
|
|
self.bot = bot
|
|
|
|
@commands.slash_command(name="coins")
|
|
async def coins(self, ctx: disnake.AppCommandInteraction):
|
|
coin = ["Орел", "Решка"]
|
|
result = random.choice(coin)
|
|
await ctx.send("Орел или решка? Угадайте! Результат будет через 3 секунды...")
|
|
await asyncio.sleep(3)
|
|
await ctx.edit_original_response(content=f"Результат: {result}!")
|
|
|
|
|
|
def setup(bot):
|
|
bot.add_cog(CoinsCommand(bot))
|