Dough Git

clove/sandrone

commands/cogs/fun/animals.py

back to commands/cogs/fun

import discord
from discord import app_commands
from discord.ext import commands
from sandrone import mood
from utils import components
import uuid


class Animals(commands.Cog):
    def __init__(self, bot: commands.Bot) -> None:
        self.bot = bot

    @app_commands.command(name="kitty", description="KITTY!")
    @mood.sassy
    async def kitty(self, interaction: discord.Interaction) -> None:
        await interaction.response.defer()
        await interaction.followup.send(view=await self.getCatPanel())

    async def getCatPanel(self) -> components.Panel:
        catUrl = f"https://cataas.com/cat?v={uuid.uuid4()}"
        return components.panel(images=[catUrl], footer="Sandrone")


async def setup(bot: commands.Bot) -> None:
    await bot.add_cog(Animals(bot))