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
|
||||
@@ -61,7 +61,7 @@ class AntiIntegration(commands.Cog):
|
||||
return True
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -70,7 +70,7 @@ class AntiIntegration(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
|
||||
@@ -89,7 +89,7 @@ class AntiIntegration(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT owner_id FROM extraowners WHERE guild_id = ? AND owner_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
extraowner_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ class AntiMemberUpdate(commands.Cog):
|
||||
self.cooldowns = {}
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -71,7 +71,7 @@ class AntiMemberUpdate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
@@ -88,7 +88,7 @@ class AntiMemberUpdate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT owner_id FROM extraowners WHERE guild_id = ? AND owner_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
extra_owner_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -59,7 +59,7 @@ class AntiBan(commands.Cog):
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_member_ban(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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
|
||||
@@ -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
|
||||
@@ -63,7 +63,7 @@ class AntiBotAdd(commands.Cog):
|
||||
return
|
||||
|
||||
guild = member.guild
|
||||
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()
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -89,7 +89,7 @@ class AntiChannelCreate(commands.Cog):
|
||||
async def on_guild_channel_create(self, channel):
|
||||
guild = channel.guild
|
||||
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
|
||||
@@ -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
|
||||
@@ -60,7 +60,7 @@ class AntiChannelDelete(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_guild_channel_delete(self, channel):
|
||||
guild = channel.guild
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
|
||||
@@ -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
|
||||
@@ -60,7 +60,7 @@ class AntiChannelUpdate(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_guild_channel_update(self, before, after):
|
||||
guild = before.guild
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
|
||||
@@ -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
|
||||
@@ -44,7 +44,7 @@ class AntiEveryone(commands.Cog):
|
||||
|
||||
guild = message.guild
|
||||
|
||||
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()
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -61,7 +61,7 @@ class AntiGuildUpdate(commands.Cog):
|
||||
return True
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -71,7 +71,7 @@ class AntiGuildUpdate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
|
||||
@@ -93,7 +93,7 @@ class AntiGuildUpdate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT serverup FROM whitelisted_users WHERE guild_id = ? AND user_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
whitelist_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ class AntiKick(commands.Cog):
|
||||
self.cooldowns = {}
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -70,7 +70,7 @@ class AntiKick(commands.Cog):
|
||||
if await self.is_blacklisted_guild(member.guild.id):
|
||||
return
|
||||
|
||||
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 = ?", (member.guild.id,)) as cursor:
|
||||
antinuke_status = await cursor.fetchone()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
@@ -87,7 +87,7 @@ class AntiKick(commands.Cog):
|
||||
if executor.id in {member.guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT owner_id FROM extraowners WHERE guild_id = ? AND owner_id = ?",
|
||||
(member.guild.id, executor.id)) as cursor:
|
||||
extraowner_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -42,7 +42,7 @@ class AntiPrune(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_member_remove(self, member):
|
||||
guild = member.guild
|
||||
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()
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ class AntiRoleCreate(commands.Cog):
|
||||
self.cooldowns = {}
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -71,7 +71,7 @@ class AntiRoleCreate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
@@ -89,7 +89,7 @@ class AntiRoleCreate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT owner_id FROM extraowners WHERE guild_id = ? AND owner_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
extra_owner_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ class AntiRoleDelete(commands.Cog):
|
||||
self.cooldowns = {}
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -71,7 +71,7 @@ class AntiRoleDelete(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
@@ -89,7 +89,7 @@ class AntiRoleDelete(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT owner_id FROM extraowners WHERE guild_id = ? AND owner_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
extra_owner_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -26,7 +26,7 @@ class AntiRoleUpdate(commands.Cog):
|
||||
self.cooldowns = {}
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -71,7 +71,7 @@ class AntiRoleUpdate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
if not antinuke_status or not antinuke_status[0]:
|
||||
@@ -89,7 +89,7 @@ class AntiRoleUpdate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT rlup FROM whitelisted_users WHERE guild_id = ? AND user_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
whitelist_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -58,7 +58,7 @@ class AntiWebhookUpdate(commands.Cog):
|
||||
return True
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -68,7 +68,7 @@ class AntiWebhookUpdate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
|
||||
@@ -87,7 +87,7 @@ class AntiWebhookUpdate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT mngweb FROM whitelisted_users WHERE guild_id = ? AND user_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
whitelist_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -58,7 +58,7 @@ class AntiWebhookCreate(commands.Cog):
|
||||
return True
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -68,7 +68,7 @@ class AntiWebhookCreate(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
|
||||
@@ -87,7 +87,7 @@ class AntiWebhookCreate(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT mngweb FROM whitelisted_users WHERE guild_id = ? AND user_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
whitelist_status = await cursor.fetchone()
|
||||
|
||||
@@ -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
|
||||
@@ -58,7 +58,7 @@ class AntiWebhookDelete(commands.Cog):
|
||||
return True
|
||||
|
||||
async def is_blacklisted_guild(self, guild_id):
|
||||
async with aiosqlite.connect('db/block.db') as block_db:
|
||||
async with aiosqlite.connect(db_path('block.db')) as block_db:
|
||||
cursor = await block_db.execute("SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (str(guild_id),))
|
||||
return await cursor.fetchone() is not None
|
||||
|
||||
@@ -68,7 +68,7 @@ class AntiWebhookDelete(commands.Cog):
|
||||
if await self.is_blacklisted_guild(guild.id):
|
||||
return
|
||||
|
||||
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()
|
||||
|
||||
@@ -87,7 +87,7 @@ class AntiWebhookDelete(commands.Cog):
|
||||
if executor.id in {guild.owner_id, self.bot.user.id}:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect('db/anti.db') as db:
|
||||
async with aiosqlite.connect(db_path('anti.db')) as db:
|
||||
async with db.execute("SELECT mngweb FROM whitelisted_users WHERE guild_id = ? AND user_id = ?",
|
||||
(guild.id, executor.id)) as cursor:
|
||||
whitelist_status = await cursor.fetchone()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user