Update project configuration files, and API routes accordingly. Add SQLite runtime file ignores to .gitignore for better file management.
Some checks failed
CI / Bot (Python) (push) Failing after 49s
CI / Dashboard (Next.js) (push) Failing after 11s

This commit is contained in:
TheOnlyMace
2026-07-21 17:11:38 +02:00
parent 5f34db4f3b
commit b4110c3d66
297 changed files with 2657 additions and 2768 deletions

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -26,35 +26,35 @@ class AntiEmojiSpam(commands.Cog):
self.emoji_threshold = 5
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_emoji_spam_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti emoji spam'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti emoji spam'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -26,35 +26,35 @@ class AntiInvite(commands.Cog):
self.invite_pattern = re.compile(r'(https?://)?(www\.)?(discord\.gg|discordapp\.com/invite|discord\.com/invite)/\S+')
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_invites_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti invites'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti invites'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -25,36 +25,36 @@ class AntiMassMention(commands.Cog):
self.mass_mention_threshold = 5
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_mass_mention_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti mass mention'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti mass mention'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -26,35 +26,35 @@ class AntiCaps(commands.Cog):
self.mute_duration = 2 * 60
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_caps_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti caps'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti caps'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -29,35 +29,35 @@ class AntiLink(commands.Cog):
self.spotify_pattern = re.compile(r'^https://open\.spotify\.com/track/\S+')
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_link_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti link'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti link'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()

View File

@@ -1,16 +1,16 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀
# ║ +-+-+-+-+-+-+-+-+
# ║ |H|e|x|a|H|o|s|t|
# ║ +-+-+-+-+-+-+-+-+
# ║ ║
# ║ © 2026 CodeX Devs — All Rights Reserved ║
# ║ © 2026 HexaHost — All Rights Reserved
# ║ ║
# ║ discord ── https://discord.gg/codexdev
# ║ youtube ── https://youtube.com/@CodeXDevs
# ║ github ── https://github.com/RayExo ║
# ║ discord ── https://discord.gg/hexahost
# ║ github ── https://github.com/theoneandonlymace
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
from utils.db_paths import db_path
import discord
from utils.emoji import TICK
@@ -27,36 +27,36 @@ class AntiSpam(commands.Cog):
self.recent_messages = {}
async def is_automod_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT enabled FROM automod WHERE guild_id = ?", (guild_id,))
result = await cursor.fetchone()
return result is not None and result[0] == 1
async def is_anti_spam_enabled(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti spam'", (guild_id,))
result = await cursor.fetchone()
return result is not None
async def get_ignored_channels(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'channel'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_ignored_roles(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT id FROM automod_ignored WHERE guild_id = ? AND type = 'role'", (guild_id,))
return [row[0] for row in await cursor.fetchall()]
async def get_punishment(self, guild_id):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT punishment FROM automod_punishments WHERE guild_id = ? AND event = 'Anti spam'", (guild_id,))
result = await cursor.fetchone()
return result[0] if result else None
async def log_action(self, guild, user, channel, action, reason):
async with aiosqlite.connect("db/automod.db") as db:
async with aiosqlite.connect(db_path("automod.db")) as db:
cursor = await db.execute("SELECT log_channel FROM automod_logging WHERE guild_id = ?", (guild.id,))
log_channel_id = await cursor.fetchone()