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,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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user