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 discord.ext import commands
|
||||
@@ -28,7 +28,7 @@ class Messagespack(commands.Cog):
|
||||
return await ctx.send("Amount must be greater than 0.")
|
||||
|
||||
today = datetime.utcnow().strftime("%Y-%m-%d")
|
||||
conn = sqlite3.connect("db/messages.db")
|
||||
conn = sqlite3.connect(db_path("messages.db"))
|
||||
c = conn.cursor()
|
||||
|
||||
c.execute("SELECT count FROM messages WHERE guild_id = ? AND user_id = ? AND date = ?",
|
||||
@@ -53,7 +53,7 @@ class Messagespack(commands.Cog):
|
||||
return await ctx.send("Amount must be greater than 0.")
|
||||
|
||||
today = datetime.utcnow().strftime("%Y-%m-%d")
|
||||
conn = sqlite3.connect("db/messages.db")
|
||||
conn = sqlite3.connect(db_path("messages.db"))
|
||||
c = conn.cursor()
|
||||
|
||||
c.execute("SELECT count FROM messages WHERE guild_id = ? AND user_id = ? AND date = ?",
|
||||
@@ -73,7 +73,7 @@ class Messagespack(commands.Cog):
|
||||
@commands.command(name="clearmessage", aliases=["clearmsg"])
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def clearmessage(self, ctx, member: discord.Member):
|
||||
conn = sqlite3.connect("db/messages.db")
|
||||
conn = sqlite3.connect(db_path("messages.db"))
|
||||
c = conn.cursor()
|
||||
c.execute("DELETE FROM messages WHERE guild_id = ? AND user_id = ?",
|
||||
(ctx.guild.id, member.id))
|
||||
|
||||
Reference in New Issue
Block a user