clove/sandrone
commands/cogs/nsfw/horny_gifs.py
import discord
from discord import app_commands
from discord.ext import commands
from sandrone import mood
from utils import components
nsfwGifUrls = {
"Catgirl Sucking": "catgirl-suck",
"Cum Filled": "cum-filled",
"Cum Thirsty": "cum-thirsty",
"Deep Kiss": "deep-kiss",
"Double Blowjob": "double-suck",
"Held Up Anal": "held-up-anal",
"Pregnant Pillow": "pregnant-pillow",
"Shuddup": "shuddup",
"Shut the fuck up": "stfu",
"Stop Yapping": "stop-yapping",
"Tied Up": "tied-up",
"Yeah Yeah Whatever": "whatever",
}
class NsfwGifs(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
async def nsfwGifAuto(
self, interaction: discord.Interaction, current: str
) -> list[app_commands.Choice[str]]:
return [
app_commands.Choice(name=name, value=name)
for name in nsfwGifUrls
if current.lower() in name.lower()
][:25]
@app_commands.command(name="nsfwgif", description="Moans!", nsfw=True)
@app_commands.describe(gif="The gif to grab")
@app_commands.autocomplete(gif=nsfwGifAuto)
@mood.sassy
async def nsfwGif(
self, interaction: discord.Interaction, gif: str
) -> None:
await interaction.response.defer()
await interaction.followup.send(view=await self.getNsfwGifUrl(gif))
async def getNsfwGifUrl(self, gif: str) -> components.Panel:
slug = nsfwGifUrls.get(gif)
if slug is None:
return components.error(f"There's no gif called `{gif}`.")
return components.panel(
images=[f"https://raw.doughmination.gay/gif/nsfw/{slug}.gif"],
footer="Sandrone",
)
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(NsfwGifs(bot))