app/cogs/deranged_commands.py

58 lines
2.8 KiB
Python
Raw Normal View History

import asyncio
import discord
from discord import app_commands
from discord.ext import commands
import os
import util
import constants
class DerangedCommands(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@app_commands.command(name="get-token", description="Get my token :3")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def token(self, interaction: discord.Interaction) -> None:
embed = discord.Embed()
embed.title = "My token"
embed.description = constants.TOKEN if util.is_owner(interaction.user.id) else "[object Object]"
embed.color = 0x00EAFF
await interaction.response.send_message(embed=embed)
@app_commands.command(name="sync", description="This will sync slash commands")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def sync(self, interaction: discord.Interaction, ephemeral: bool) -> None:
if not util.is_owner(interaction.user.id):
await interaction.response.send_message(embed=util.fuckoff_embed)
return
await self.bot.tree.sync()
embed = discord.Embed()
embed.description = ":white_check_mark: Synced slash commands"
embed.color = util.success
await interaction.response.send_message(embed=embed, ephemeral=ephemeral)
@app_commands.command(name="say", description="veev arc")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def say(self, interaction: discord.Interaction, content: str) -> None:
await interaction.response.send_message(content=content)
@app_commands.command(name="java-yap", description="Uwu")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def javaer(self, interaction: discord.Interaction) -> None:
await interaction.response.send_message(content=f"https://files.catbox.moe/yeirho.mp4")
@app_commands.command(name="cook", description="Cooking show magic :meowlien:")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def cook(self, interaction: discord.Interaction, victim: discord.User) -> None:
await interaction.response.send_message(content=f"Cooking {victim.mention} 👨‍🍳")
await asyncio.sleep(4);
await interaction.followup.send(content=f"Cooked {victim.mention}")
async def setup(bot: commands.Bot) -> None:
2024-06-27 08:27:06 -04:00
await bot.add_cog(DerangedCommands(bot))