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 ICONS_CHANNEL, ICONS_PLUS, TICK, ZTICK
@@ -65,7 +65,7 @@ class Welcomer(commands.Cog):
self.bot.loop.create_task(self._create_table())
async def _create_table(self):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("""
CREATE TABLE IF NOT EXISTS welcome (
guild_id INTEGER PRIMARY KEY,
@@ -93,7 +93,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_setup(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
async with db.execute("SELECT * FROM welcome WHERE guild_id = ?", (ctx.guild.id,)) as cursor:
row = await cursor.fetchone()
@@ -247,7 +247,7 @@ class Welcomer(commands.Cog):
async def _save_welcome_data(self, guild_id, welcome_type, message, embed_data=None):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("""
INSERT OR REPLACE INTO welcome (guild_id, welcome_type, welcome_message, embed_data)
VALUES (?, ?, ?, ?)
@@ -431,7 +431,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_reset(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
cursor = await db.execute("SELECT 1 FROM welcome WHERE guild_id = ?", (ctx.guild.id,))
is_set_up = await cursor.fetchone()
@@ -454,7 +454,7 @@ class Welcomer(commands.Cog):
await interaction.response.send_message("Only the command author can confirm this action.", ephemeral=True)
return
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("DELETE FROM welcome WHERE guild_id = ?", (ctx.guild.id,))
await db.commit()
@@ -490,7 +490,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_channel(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
async with db.execute("SELECT welcome_type, channel_id FROM welcome WHERE guild_id = ?", (ctx.guild.id,)) as cursor:
result = await cursor.fetchone()
welcome_message = result[0] if result else None
@@ -524,7 +524,7 @@ class Welcomer(commands.Cog):
selected_channel_id = int(select_menu.values[0])
selected_channel = ctx.guild.get_channel(selected_channel_id)
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("UPDATE welcome SET channel_id = ? WHERE guild_id = ?", (selected_channel_id, ctx.guild.id))
await db.commit()
@@ -580,7 +580,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_test(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
async with db.execute("SELECT welcome_type, welcome_message, channel_id, embed_data FROM welcome WHERE guild_id = ?", (ctx.guild.id,)) as cursor:
row = await cursor.fetchone()
@@ -680,7 +680,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_config(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
async with db.execute("SELECT * FROM welcome WHERE guild_id = ?", (ctx.guild.id,)) as cursor:
row = await cursor.fetchone()
@@ -750,7 +750,7 @@ class Welcomer(commands.Cog):
return
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("""
UPDATE welcome
SET auto_delete_duration = ?
@@ -769,7 +769,7 @@ class Welcomer(commands.Cog):
@commands.cooldown(1, 6, commands.BucketType.user)
@commands.max_concurrency(1, per=commands.BucketType.default, wait=False)
async def greet_edit(self, ctx):
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
async with db.execute("SELECT welcome_type, welcome_message, embed_data FROM welcome WHERE guild_id = ?", (ctx.guild.id,)) as cursor:
row = await cursor.fetchone()
@@ -820,7 +820,7 @@ class Welcomer(commands.Cog):
await ctx.send("Setup was canceled. No changes were made.")
return
await new_message.delete()
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("UPDATE welcome SET welcome_message = ? WHERE guild_id = ?", (new_message.content, ctx.guild.id))
await db.commit()
@@ -924,7 +924,7 @@ class Welcomer(commands.Cog):
else:
embed_data_json[selected_option] = url_or_text
async with aiosqlite.connect("db/welcome.db") as db:
async with aiosqlite.connect(db_path("welcome.db")) as db:
await db.execute("UPDATE welcome SET embed_data = ? WHERE guild_id = ?", (json.dumps(embed_data_json), ctx.guild.id))
await db.commit()