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 jsondb_path
import discord
from discord.ext import commands, tasks
@@ -56,7 +56,7 @@ class Birthdays(commands.Cog):
@commands.has_permissions(administrator=True)
@commands.guild_only()
async def birthday_setup(self, ctx: commands.Context, channel: discord.TextChannel, role: discord.Role):
db = read_db('jsondb/birthday_logs.json')
db = read_db(jsondb_path('birthday_logs.json'))
guild_id = str(ctx.guild.id)
if guild_id not in db:
@@ -65,7 +65,7 @@ class Birthdays(commands.Cog):
db[guild_id]["birthday_channel_id"] = channel.id
db[guild_id]["birthday_role_id"] = role.id
write_db('jsondb/birthday_logs.json', db)
write_db(jsondb_path('birthday_logs.json'), db)
await ctx.send(view=CV2("Birthday Setup", f"Birthday log channel set to {channel.mention} and birthday role set to {role.mention}."))
@@ -104,9 +104,9 @@ class Birthdays(commands.Cog):
return
date = f"{month}-{day}-{year}"
db = read_db('jsondb/birthdays.json')
db = read_db(jsondb_path('birthdays.json'))
db[str(ctx.author.id)] = date
write_db('jsondb/birthdays.json', db)
write_db(jsondb_path('birthdays.json'), db)
await ctx.send(view=CV2("Success", f"Your birthday has been set to {date}."))
except asyncio.TimeoutError:
@@ -117,11 +117,11 @@ class Birthdays(commands.Cog):
help="Remove your birthday.")
@commands.guild_only()
async def remove_birthday(self, ctx: commands.Context):
db = read_db('jsondb/birthdays.json')
db = read_db(jsondb_path('birthdays.json'))
if str(ctx.author.id) in db:
del db[str(ctx.author.id)]
write_db('jsondb/birthdays.json', db)
write_db(jsondb_path('birthdays.json'), db)
await ctx.send(view=CV2("Success", "Your birthday has been removed."))
else:
await ctx.send(view=CV2("Error", "You have no birthday set."))
@@ -133,7 +133,7 @@ class Birthdays(commands.Cog):
async def list_birthdays(self, ctx: commands.Context):
now = datetime.datetime.now()
today_date = now.strftime("%m-%d")
db = read_db('jsondb/birthdays.json')
db = read_db(jsondb_path('birthdays.json'))
members_with_birthday = [ctx.guild.get_member(int(user_id)) for user_id, date in db.items() if date.startswith(today_date)]
@@ -148,7 +148,7 @@ class Birthdays(commands.Cog):
help="Check your birthday.")
@commands.guild_only()
async def check_birthday(self, ctx: commands.Context):
db = read_db('jsondb/birthdays.json')
db = read_db(jsondb_path('birthdays.json'))
if str(ctx.author.id) in db:
date = db[str(ctx.author.id)]
@@ -160,8 +160,8 @@ class Birthdays(commands.Cog):
async def check_birthdays(self):
now = datetime.datetime.now()
today_date = now.strftime("%m-%d")
db = read_db('jsondb/birthdays.json')
guild_settings = read_db('jsondb/birthday_logs.json')
db = read_db(jsondb_path('birthdays.json'))
guild_settings = read_db(jsondb_path('birthday_logs.json'))
for user_id, birthday in db.items():
if birthday.startswith(today_date):