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, TICK, ZWARNING
|
||||
@@ -27,8 +27,8 @@ from utils.config import *
|
||||
|
||||
|
||||
|
||||
DATABASE_PATH = 'db/customrole.db'
|
||||
DATABASE_PATH2 = 'db/np.db'
|
||||
DATABASE_PATH = db_path('customrole.db')
|
||||
DATABASE_PATH2 = db_path('np.db')
|
||||
|
||||
|
||||
class Customrole(commands.Cog):
|
||||
@@ -81,7 +81,7 @@ class Customrole(commands.Cog):
|
||||
|
||||
|
||||
async def handle_role_command(self, context: Context, member: discord.Member, role_type: str):
|
||||
async with aiosqlite.connect('db/customrole.db') as db:
|
||||
async with aiosqlite.connect(db_path('customrole.db')) as db:
|
||||
async with db.execute(f"SELECT reqrole, {role_type} FROM roles WHERE guild_id = ?", (context.guild.id,)) as cursor:
|
||||
data = await cursor.fetchone()
|
||||
if data:
|
||||
|
||||
Reference in New Issue
Block a user