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,21 +1,21 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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
|
||||
|
||||
from discord.ext import commands, tasks
|
||||
from discord import *
|
||||
import discord
|
||||
from utils.emoji import BOOST, ICONS_WARNING, INFO, MENTION, PREMIUM, TICK, TIME, TIMER_ALT1, U_ADMIN, ZDIL, ZHUMAN, ZYROXHAMMER, ZYROXSYS
|
||||
from utils.emoji import BOOST, ICONS_WARNING, INFO, MENTION, PREMIUM, TICK, TIME, TIMER_ALT1, U_ADMIN, ZDIL, ZHUMAN, HEXAHOST_HAMMER, HEXAHOST_SYS
|
||||
import aiosqlite
|
||||
from typing import Optional
|
||||
from datetime import datetime, timedelta
|
||||
@@ -143,7 +143,7 @@ class TimeSelect(Select):
|
||||
await log_channel.send(view=embed)
|
||||
|
||||
embed = CV2Embed(
|
||||
description=f"**Added Global No Prefix**:\n{ZHUMAN} User: **{self.user.mention}**\n{MENTION} User Mention: {self.user.mention}\n{ZYROXSYS} User ID: {self.user.id}\n\n__**Additional Info**__:\n{ZYROXHAMMER} Added By: **{self.author.display_name}**\n{TIME} Expiry Time: {expiry_text}\n{BOOST} Timestamp: {expiry_timestamp}",
|
||||
description=f"**Added Global No Prefix**:\n{ZHUMAN} User: **{self.user.mention}**\n{MENTION} User Mention: {self.user.mention}\n{HEXAHOST_SYS} User ID: {self.user.id}\n\n__**Additional Info**__:\n{HEXAHOST_HAMMER} Added By: **{self.author.display_name}**\n{TIME} Expiry Time: {expiry_text}\n{BOOST} Timestamp: {expiry_timestamp}",
|
||||
color=0xFF0000,
|
||||
)
|
||||
embed.set_author(
|
||||
@@ -171,7 +171,7 @@ class NoPrefix(commands.Cog):
|
||||
def __init__(self, client):
|
||||
self.client = client
|
||||
self.staff = set()
|
||||
self.db_path = "db/np.db"
|
||||
self.db_path = db_path("np.db")
|
||||
self.client.loop.create_task(self.load_staff())
|
||||
self.client.loop.create_task(self.setup_database())
|
||||
self.expiry_check.start()
|
||||
@@ -278,7 +278,7 @@ class NoPrefix(commands.Cog):
|
||||
support = Button(
|
||||
label="Support",
|
||||
style=discord.ButtonStyle.link,
|
||||
url=f"https://discord.gg/codexdev",
|
||||
url=f"https://discord.gg/hexahost",
|
||||
)
|
||||
view = View()
|
||||
view.add_item(support)
|
||||
@@ -363,7 +363,7 @@ class NoPrefix(commands.Cog):
|
||||
@_np.command(name="remove", help="Remove user from no-prefix")
|
||||
@commands.check(is_owner_or_staff)
|
||||
async def np_remove(self, ctx, user: discord.User):
|
||||
async with aiosqlite.connect("db/np.db") as db:
|
||||
async with aiosqlite.connect(db_path("np.db")) as db:
|
||||
async with db.execute(
|
||||
"SELECT id FROM np WHERE id = ?", (user.id,)
|
||||
) as cursor:
|
||||
@@ -423,7 +423,7 @@ class NoPrefix(commands.Cog):
|
||||
)
|
||||
@commands.check(is_owner_or_staff)
|
||||
async def np_status(self, ctx, user: discord.User):
|
||||
async with aiosqlite.connect("db/np.db") as db:
|
||||
async with aiosqlite.connect(db_path("np.db")) as db:
|
||||
async with db.execute(
|
||||
"SELECT id, expiry_time FROM np WHERE id = ?", (user.id,)
|
||||
) as cursor:
|
||||
@@ -581,7 +581,7 @@ class NoPrefix(commands.Cog):
|
||||
|
||||
embed = CV2Embed(
|
||||
title="Congratulations you got 2 months No Prefix!",
|
||||
description=f"You've been credited 2 months of global No Prefix for boosting our Partnered Servers. You can now use my commands without prefix. If you wish to remove it, please reach out [Support Server](https://discord.gg/codexdev).",
|
||||
description=f"You've been credited 2 months of global No Prefix for boosting our Partnered Servers. You can now use my commands without prefix. If you wish to remove it, please reach out [Support Server](https://discord.gg/hexahost).",
|
||||
color=0xFF0000,
|
||||
)
|
||||
try:
|
||||
@@ -613,7 +613,7 @@ class NoPrefix(commands.Cog):
|
||||
|
||||
embed = CV2Embed(
|
||||
title=f"{ICONS_WARNING} Global No Prefix Expired",
|
||||
description=f"Hey {user.mention}, your global no prefix has expired!\n\n__**Reason:**__ Unboosting our partnered Server.\nIf you think this is a mistake then please reach out [Support Server](https://discord.gg/codexdev).",
|
||||
description=f"Hey {user.mention}, your global no prefix has expired!\n\n__**Reason:**__ Unboosting our partnered Server.\nIf you think this is a mistake then please reach out [Support Server](https://discord.gg/hexahost).",
|
||||
color=0xFF0000,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user