AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

This commit is contained in:
nin0dev 2024-10-04 08:01:42 -04:00
parent 5d4538cd50
commit be5c916a69
Signed by: nin0
GPG key ID: 3FA8F96ABAE04214
6 changed files with 325 additions and 279 deletions

338
.gitignore vendored
View file

@ -1,170 +1,170 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.env
bin/
include/
lib/
lib64/
lib64
pyvenv.cfg
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.env
bin/
include/
lib/
lib64/
lib64
pyvenv.cfg
constants.py

View file

@ -1,47 +1,58 @@
import discord
from discord import app_commands
from discord.ext import commands
import os
import util
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") if util.is_owner(interaction.user.id) else "[object Object]"
embed.color = 0x00EAFF
await interaction.response.send_message(embed=embed, ephemeral=True)
@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")
async def setup(bot: commands.Bot) -> None:
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:
await bot.add_cog(DerangedCommands(bot))

58
cogs/tags.py Normal file
View file

@ -0,0 +1,58 @@
import discord
from discord import app_commands
from discord.ext import commands
import os
import util
import constants
class Tags(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@app_commands.command(name="tag-forwarding", description="Show a thing about forwarding")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def forward(self, interaction: discord.Interaction, target: discord.User = None) -> None:
await interaction.response.send_message(content=f"Hey {target.mention}, take a look at this!" if target else "",
embed=discord.Embed(
title="Forwarding",
description="If you do not have forwarding natively, without messing with Experiments, enabling it won't do anything. The experiment is server side locked.",
color=0x00AEFF
))
@app_commands.command(name="tag-dev", description="Show a thing about Vencord plugin dev")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def dev(self, interaction: discord.Interaction, target: discord.User = None) -> None:
await interaction.response.send_message(content=f"Hey {target.mention}, take a look at this!" if target else "",
embed=discord.Embed(
title="Plugin development",
description="Want to get started with plugin development? Some things are there to help you!\n\n**Documentation**\n- https://docs.vencord.dev\n- Just look on the Vencord repo for code\n\n**Channels**\n<#1032770730703716362>, but read <#1032770730703716362> first.",
color=0x00AEFF
))
@app_commands.command(name="tag-dev", description="Show a thing about Vencord plugin dev")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def dev(self, interaction: discord.Interaction, target: discord.User = None) -> None:
await interaction.response.send_message(content=f"Hey {target.mention}, take a look at this!" if target else "",
embed=discord.Embed(
title="Plugin development",
description="Want to get started with plugin development? Some things are there to help you!\n\n**Documentation**\n- https://docs.vencord.dev\n- Just look on the Vencord repo for code\n\n**Channels**\n<#1032770730703716362>, but read <#1032770730703716362> first.",
color=0x00AEFF
))
@app_commands.command(name="tag-cant-read", description="You can't read")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def dev2(self, interaction: discord.Interaction, target: discord.User = None) -> None:
await interaction.response.send_message(content=f"Hey {target.mention}, take a look at this!" if target else "",
embed=discord.Embed(
title="Wrong channel!",
description="Currently, you are in modmail. Your question is a support question, not a question only a staff member could answer.\n*Because you couldn't read the huge WARNING on the modmail channel, you have been banned from opening tickets. Go to <#1026515880080842772>.*",
color=0xFF8989
))
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(Tags(bot))

View file

@ -1,24 +0,0 @@
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))

67
main.py
View file

@ -1,34 +1,35 @@
import discord
import os
from discord import app_commands
from discord.ext import commands
from cogs.deranged_commands import DerangedCommands
from cogs.victimization import Victimization
from dotenv import load_dotenv
import selfcord
import constants
load_dotenv()
client = commands.Bot(intents=discord.Intents.all(), command_prefix=".")
user = selfcord.Client()
@client.event
async def on_message(message):
if message.author.id != 886685857560539176:
return
if message.content.startswith('.sync'):
await client.tree.sync()
await message.channel.send('Synced commands')
@client.event
async def on_ready():
print("Logged in as bot")
await user.login(constants.USER_TOKEN)
print("Logged in as user")
await client.add_cog(DerangedCommands(client))
print("Loaded all cogs")
import discord
import os
from discord import app_commands
from discord.ext import commands
from cogs.deranged_commands import DerangedCommands
from dotenv import load_dotenv
#import selfcord
from cogs.tags import Tags
import constants
load_dotenv()
client = commands.Bot(intents=discord.Intents.all(), command_prefix=".")
#user = selfcord.Client()
@client.event
async def on_message(message):
if message.author.id != 886685857560539176:
return
if message.content.startswith('.sync'):
await client.tree.sync()
await message.channel.send('Synced commands')
@client.event
async def on_ready():
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(Tags(client))
print("Loaded all cogs")
client.run(constants.TOKEN)

14
util.py
View file

@ -1,7 +1,7 @@
from discord import Embed
def is_owner(id: int):
return True if id == 886685857560539176 else False
success = 0x77b255
error = 0xdd2e44
fuckoff_embed = Embed(title="No permissions", description="You can't use this.", color=error)
from discord import Embed
def is_owner(id: int):
return True if id == 886685857560539176 else False
success = 0x77b255
error = 0xdd2e44
fuckoff_embed = Embed(title="You are an idiot", description="You can't use this.", color=error)