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,33 +1,33 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 utils.emoji import ZWARNING
|
||||
from core import zyrox, Cog
|
||||
from core import HexaHost, Cog
|
||||
from discord.ext import commands
|
||||
import aiosqlite
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
class AutoBlacklist(Cog):
|
||||
def __init__(self, client: zyrox):
|
||||
def __init__(self, client: HexaHost):
|
||||
self.client = client
|
||||
self.spam_cd_mapping = commands.CooldownMapping.from_cooldown(5, 5, commands.BucketType.member)
|
||||
self.spam_command_mapping = commands.CooldownMapping.from_cooldown(6, 10, commands.BucketType.member)
|
||||
self.last_spam = {}
|
||||
self.spam_threshold = 5
|
||||
self.spam_window = timedelta(minutes=10)
|
||||
self.db_path = 'db/block.db'
|
||||
self.db_path = db_path('block.db')
|
||||
self.bot_user_id = self.client.user.id if self.client.user else None
|
||||
self.guild_command_tracking = {}
|
||||
|
||||
@@ -44,7 +44,7 @@ class AutoBlacklist(Cog):
|
||||
title=f"{ZWARNING} Guild Blacklisted",
|
||||
description=(
|
||||
f"This guild has been blacklisted due to spamming or automation. "
|
||||
f"If you believe this is a mistake, please contact our [Support Server](https://discord.gg/codexdev) with any proof if possible."
|
||||
f"If you believe this is a mistake, please contact our [Support Server](https://discord.gg/hexahost) with any proof if possible."
|
||||
),
|
||||
color=0xFF0000
|
||||
)
|
||||
@@ -102,7 +102,7 @@ class AutoBlacklist(Cog):
|
||||
title=f"{ZWARNING} Guild Blacklisted",
|
||||
description=(
|
||||
f"The guild has been blacklisted for excessive command usage. "
|
||||
f"If you believe this is a mistake, please contact our [Support Server](https://discord.gg/codexdev)."
|
||||
f"If you believe this is a mistake, please contact our [Support Server](https://discord.gg/hexahost)."
|
||||
),
|
||||
color=0xFF0000
|
||||
)
|
||||
@@ -123,7 +123,7 @@ class AutoBlacklist(Cog):
|
||||
await self.add_to_blacklist(user_id=message.author.id)
|
||||
embed = discord.Embed(
|
||||
title=f"{ZWARNING} User Blacklisted",
|
||||
description=f"**{message.author.mention} has been blacklisted for repeatedly mentioning me. If you believe this is a mistake, please contact our [Support Server](https://discord.gg/codexdev) with any proof if possible.**",
|
||||
description=f"**{message.author.mention} has been blacklisted for repeatedly mentioning me. If you believe this is a mistake, please contact our [Support Server](https://discord.gg/hexahost) with any proof if possible.**",
|
||||
color=0xFF0000
|
||||
)
|
||||
await message.channel.send(embed=embed)
|
||||
@@ -155,7 +155,7 @@ class AutoBlacklist(Cog):
|
||||
await self.add_to_blacklist(user_id=ctx.author.id)
|
||||
embed = discord.Embed(
|
||||
title=f"{ZWARNING} User Blacklisted",
|
||||
description=f"**{ctx.author.mention} has been blacklisted for spamming commands. If you believe this is a mistake, please contact our [Support Server](https://discord.gg/codexdev) with any proof if possible.**",
|
||||
description=f"**{ctx.author.mention} has been blacklisted for spamming commands. If you believe this is a mistake, please contact our [Support Server](https://discord.gg/hexahost) with any proof if possible.**",
|
||||
color=0xFF0000
|
||||
)
|
||||
await ctx.reply(embed=embed)
|
||||
|
||||
Reference in New Issue
Block a user