Update project configuration files, and API routes accordingly. Add SQLite runtime file ignores to .gitignore for better file management.
This commit is contained in:
@@ -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 CROSS, CROSS_ALT, ML_CROSS, TICK, TICK_ALT, ZWARNING
|
||||
@@ -374,7 +374,7 @@ class EmergencyRestoreResultView(LayoutView):
|
||||
class Emergency(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.db_path = "db/emergency.db"
|
||||
self.db_path = db_path("emergency.db")
|
||||
self.bot.loop.create_task(self.initialize_database())
|
||||
|
||||
async def initialize_database(self):
|
||||
@@ -533,7 +533,7 @@ class Emergency(commands.Cog):
|
||||
is_owner = await self.is_guild_owner(ctx)
|
||||
if not is_owner:
|
||||
return await ctx.reply(view=AuthoriseErrorView("owner_list"))
|
||||
async with aiosqlite.connect("db/emergency.db") as db:
|
||||
async with aiosqlite.connect(db_path("emergency.db")) as db:
|
||||
cursor = await db.execute(
|
||||
"SELECT user_id FROM authorised_users WHERE guild_id = ?",
|
||||
(ctx.guild.id,),
|
||||
@@ -606,7 +606,7 @@ class Emergency(commands.Cog):
|
||||
is_auth = await self.is_guild_owner_or_authorised(ctx)
|
||||
if not is_auth:
|
||||
return await ctx.reply(view=RoleErrorView("owner_list"))
|
||||
async with aiosqlite.connect("db/emergency.db") as db:
|
||||
async with aiosqlite.connect(db_path("emergency.db")) as db:
|
||||
cursor = await db.execute(
|
||||
"SELECT role_id FROM emergency_roles WHERE guild_id = ?",
|
||||
(ctx.guild.id,),
|
||||
@@ -632,7 +632,7 @@ class Emergency(commands.Cog):
|
||||
guild_id = ctx.guild.id
|
||||
|
||||
antinuke_enabled = False
|
||||
async with aiosqlite.connect("db/anti.db") as anti:
|
||||
async with aiosqlite.connect(db_path("anti.db")) as anti:
|
||||
cursor = await anti.execute(
|
||||
"SELECT status FROM antinuke WHERE guild_id = ?", (guild_id,)
|
||||
)
|
||||
@@ -731,7 +731,7 @@ class Emergency(commands.Cog):
|
||||
await ctx.reply(view=result_view)
|
||||
|
||||
if antinuke_enabled:
|
||||
async with aiosqlite.connect("db/anti.db") as anti:
|
||||
async with aiosqlite.connect(db_path("anti.db")) as anti:
|
||||
await anti.execute("INSERT INTO antinuke VALUES (?, 1)", (guild_id,))
|
||||
await anti.commit()
|
||||
await proc_msg.delete()
|
||||
|
||||
Reference in New Issue
Block a user