Push bad code guhh idk

This commit is contained in:
nin0dev 2024-06-28 17:16:12 -04:00
parent 05e9f6872b
commit 5d4538cd50
4 changed files with 45 additions and 6 deletions

1
.gitignore vendored
View file

@ -167,3 +167,4 @@ lib/
lib64/ lib64/
lib64 lib64
pyvenv.cfg pyvenv.cfg
constants.py

View file

@ -21,7 +21,7 @@ class DerangedCommands(commands.Cog):
@app_commands.command(name="sync", description="This will sync slash commands") @app_commands.command(name="sync", description="This will sync slash commands")
@app_commands.allowed_installs(guilds=False, users=True) @app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True) @app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def sync(self, interaction: discord.Interaction) -> None: async def sync(self, interaction: discord.Interaction, ephemeral: bool) -> None:
if not util.is_owner(interaction.user.id): if not util.is_owner(interaction.user.id):
await interaction.response.send_message(embed=util.fuckoff_embed) await interaction.response.send_message(embed=util.fuckoff_embed)
return return
@ -29,7 +29,19 @@ class DerangedCommands(commands.Cog):
embed = discord.Embed() embed = discord.Embed()
embed.description = ":white_check_mark: Synced slash commands" embed.description = ":white_check_mark: Synced slash commands"
embed.color = util.success embed.color = util.success
await interaction.response.send_message(embed=embed, ephemeral=True) 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")
async def setup(bot: commands.Bot) -> None: async def setup(bot: commands.Bot) -> None:
await bot.add_cog(DerangedCommands(bot)) await bot.add_cog(DerangedCommands(bot))

24
cogs/victimization.py Normal file
View file

@ -0,0 +1,24 @@
import discord
from discord import app_commands
from discord.ext import commands
import os
import util
class Victimization(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@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:
embed = discord.Embed()
embed.title = "My token"
embed.description = os.getenv("TOKEN") if util.is_owner(interaction.user.id) else "[object Object]"
embed.color = 0x00EAFF
await interaction.response.send_message(embed=embed, ephemeral=True)
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(Victimization(bot))

10
main.py
View file

@ -3,9 +3,10 @@ import os
from discord import app_commands from discord import app_commands
from discord.ext import commands from discord.ext import commands
from cogs.deranged_commands import DerangedCommands from cogs.deranged_commands import DerangedCommands
from cogs.support_helper import SupportHelper from cogs.victimization import Victimization
from dotenv import load_dotenv from dotenv import load_dotenv
import selfcord import selfcord
import constants
load_dotenv() load_dotenv()
@ -24,9 +25,10 @@ async def on_message(message):
@client.event @client.event
async def on_ready(): async def on_ready():
await user.login(os.getenv("USER_TOKEN")) print("Logged in as bot")
await user.login(constants.USER_TOKEN)
print("Logged in as user")
await client.add_cog(DerangedCommands(client)) await client.add_cog(DerangedCommands(client))
await client.add_cog(SupportHelper(client))
print("Loaded all cogs") print("Loaded all cogs")
client.run(os.getenv("TOKEN")) client.run(constants.TOKEN)