feat(silly): new commad & botinfo now does discord-py version

This commit is contained in:
neoarz
2025-10-17 00:15:06 -04:00
parent 7955035b3b
commit 61848f6bc8
4 changed files with 58 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
import discord
from discord.ext import commands
from discord.ext.commands import Context
def silly_command():
@commands.hybrid_command(
name="silly",
description="Sends a silly message :3",
)
async def silly(self, context, message_type: str = "regular"):
if message_type == "animated":
message = "https://yes.nighty.works/raw/LX4nqt.gif"
else:
message = ":3"
interaction = getattr(context, "interaction", None)
if interaction is not None:
await interaction.response.defer(ephemeral=True)
await context.channel.send(message)
try:
await interaction.delete_original_response()
except:
pass
else:
try:
await context.message.delete()
except:
pass
await context.channel.send(message)
return silly