Cogified
This commit is contained in:
parent
caccd2ceb7
commit
8fa038b942
2 changed files with 28 additions and 12 deletions
21
cogs/deranged_commands.py
Normal file
21
cogs/deranged_commands.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import discord
|
||||
from discord import app_commands
|
||||
from discord.ext import commands
|
||||
import os
|
||||
|
||||
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 = os.getenv("TOKEN")
|
||||
embed.color = 0x00EAFF
|
||||
await interaction.response.send_message(embed=embed, ephemeral=True)
|
||||
|
||||
async def setup(bot: commands.Bot) -> None:
|
||||
await bot.add_cog(DerangedCommands(bot))
|
Loading…
Add table
Add a link
Reference in a new issue