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,3 +1,4 @@
from utils.db_paths import db_path
import discord
from discord.ext import commands
import aiosqlite
@@ -29,7 +30,7 @@ class AntiEmojiCreate(commands.Cog):
@commands.Cog.listener()
async def on_guild_emojis_update(self, guild, before, after):
if len(after) > len(before):
async with aiosqlite.connect('db/anti.db') as db:
async with aiosqlite.connect(db_path('anti.db')) as db:
async with db.execute("SELECT status FROM antinuke WHERE guild_id = ?", (guild.id,)) as cursor:
antinuke_status = await cursor.fetchone()

View File

@@ -1,3 +1,4 @@
from utils.db_paths import db_path
import discord
from discord.ext import commands
import aiosqlite
@@ -29,7 +30,7 @@ class AntiEmojiDelete(commands.Cog):
@commands.Cog.listener()
async def on_guild_emojis_update(self, guild, before, after):
if len(after) < len(before):
async with aiosqlite.connect('db/anti.db') as db:
async with aiosqlite.connect(db_path('anti.db')) as db:
async with db.execute("SELECT status FROM antinuke WHERE guild_id = ?", (guild.id,)) as cursor:
antinuke_status = await cursor.fetchone()

View File

@@ -1,3 +1,4 @@
from utils.db_paths import db_path
import discord
from discord.ext import commands
import aiosqlite
@@ -29,7 +30,7 @@ class AntiEmojiUpdate(commands.Cog):
@commands.Cog.listener()
async def on_guild_emojis_update(self, guild, before, after):
if len(after) == len(before): # An emoji was updated
async with aiosqlite.connect('db/anti.db') as db:
async with aiosqlite.connect(db_path('anti.db')) as db:
async with db.execute("SELECT status FROM antinuke WHERE guild_id = ?", (guild.id,)) as cursor:
antinuke_status = await cursor.fetchone()

View File

@@ -1,3 +1,4 @@
from utils.db_paths import db_path
import discord
from discord.ext import commands
from datetime import timedelta, datetime
@@ -34,7 +35,7 @@ class AntiSticker(commands.Cog):
else:
action = discord.AuditLogAction.sticker_update
async with aiosqlite.connect('db/anti.db') as db:
async with aiosqlite.connect(db_path('anti.db')) as db:
async with db.execute("SELECT status FROM antinuke WHERE guild_id = ?", (guild.id,)) as cursor:
antinuke_status = await cursor.fetchone()

View File

@@ -1,3 +1,4 @@
from utils.db_paths import db_path
import discord
from discord.ext import commands
import aiosqlite
@@ -26,7 +27,7 @@ class AntiUnban(commands.Cog):
@commands.Cog.listener()
async def on_member_unban(self, guild, user):
async with aiosqlite.connect('db/anti.db') as db:
async with aiosqlite.connect(db_path('anti.db')) as db:
async with db.execute("SELECT status FROM antinuke WHERE guild_id = ?", (guild.id,)) as cursor:
antinuke_status = await cursor.fetchone()