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,14 +1,13 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
@@ -17,11 +16,11 @@ import json
|
||||
import aiosqlite
|
||||
from discord.ext import commands
|
||||
from utils.config import serverLink
|
||||
from core import zyrox, Cog, Context
|
||||
from core import HexaHost, Cog, Context
|
||||
from utils.Tools import get_ignore_data
|
||||
|
||||
class Errors(Cog):
|
||||
def __init__(self, client: zyrox):
|
||||
def __init__(self, client: HexaHost):
|
||||
self.client = client
|
||||
|
||||
@commands.Cog.listener()
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, ZMODULE
|
||||
from discord.utils import *
|
||||
from core import zyrox, Cog
|
||||
from core import HexaHost, Cog
|
||||
from utils.Tools import *
|
||||
from utils.config import BotName, serverLink
|
||||
from discord.ext import commands
|
||||
from discord.ui import Button, View
|
||||
|
||||
class Autorole(Cog):
|
||||
def __init__(self, bot: zyrox):
|
||||
def __init__(self, bot: HexaHost):
|
||||
self.bot = bot
|
||||
|
||||
|
||||
@@ -31,14 +30,14 @@ class Autorole(Cog):
|
||||
async for entry in guild.audit_logs(limit=3):
|
||||
if entry.action == discord.AuditLogAction.bot_add:
|
||||
embed = discord.Embed(
|
||||
description=f"{ZMODULE} **Thanks for adding me.**\n\n{ARROWRED} My default prefix is `>`\n{ARROWRED}> Use the `>help` command to see a list of commands\n{ARROWRED} For detailed guides, FAQ and information, visit our **[Support Server](https://discord.gg/codexdev)**",
|
||||
description=f"{ZMODULE} **Thanks for adding me.**\n\n{ARROWRED} My default prefix is `>`\n{ARROWRED}> Use the `>help` command to see a list of commands\n{ARROWRED} For detailed guides, FAQ and information, visit our **[Support Server](https://discord.gg/hexahost)**",
|
||||
color=0xFF0000
|
||||
)
|
||||
embed.set_thumbnail(url=entry.user.avatar.url if entry.user.avatar else entry.user.default_avatar.url)
|
||||
embed.set_author(name=f"{guild.name}", icon_url=guild.me.display_avatar.url)
|
||||
|
||||
website_button = Button(label='Website', style=discord.ButtonStyle.link, url='https://.vercel.app')
|
||||
support_button = Button(label='Support', style=discord.ButtonStyle.link, url='https://discord.gg/codexdev')
|
||||
support_button = Button(label='Support', style=discord.ButtonStyle.link, url='https://discord.gg/hexahost')
|
||||
vote_button = Button(label='Vote for Me', style=discord.ButtonStyle.link, url=f'https://top.gg/bot/{self.bot.user.id}/vote')
|
||||
view = View()
|
||||
view.add_item(support_button)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
@@ -21,7 +21,7 @@ import asyncio
|
||||
class AutoReactListener(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.db_path = 'db/autoreact.db'
|
||||
self.db_path = db_path('autoreact.db')
|
||||
self.rate_limited_users = set()
|
||||
|
||||
async def get_triggers(self, guild_id):
|
||||
|
||||
@@ -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
|
||||
import aiohttp
|
||||
@@ -18,14 +18,14 @@ import aiosqlite
|
||||
import asyncio
|
||||
import logging
|
||||
from discord.ext import commands
|
||||
from core import zyrox, Cog
|
||||
from core import HexaHost, Cog
|
||||
from utils.config import *
|
||||
|
||||
DATABASE_PATH = 'db/autorole.db'
|
||||
DATABASE_PATH = db_path('autorole.db')
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Autorole2(Cog):
|
||||
def __init__(self, bot: zyrox):
|
||||
def __init__(self, bot: HexaHost):
|
||||
self.bot = bot
|
||||
self.headers = {"Authorization": f"Bot {self.bot.http.token}"}
|
||||
|
||||
|
||||
@@ -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
|
||||
import aiosqlite
|
||||
@@ -44,7 +44,7 @@ class greet(commands.Cog):
|
||||
async def process_queue(self, guild):
|
||||
while self.join_queue[guild.id]:
|
||||
member = self.join_queue[guild.id].pop(0)
|
||||
async with aiosqlite.connect("db/welcome.db") as db:
|
||||
async with aiosqlite.connect(db_path("welcome.db")) as db:
|
||||
async with db.execute("SELECT welcome_type, welcome_message, channel_id, embed_data, auto_delete_duration FROM welcome WHERE guild_id = ?", (guild.id,)) as cursor:
|
||||
row = await cursor.fetchone()
|
||||
if row is None:
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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
|
||||
|
||||
from utils import getConfig
|
||||
from utils.config import BotName
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, CODEBASE, HEART3, INDEX, ZYROXLINKS
|
||||
from utils.emoji import ARROWRED, CODEBASE, HEART3, INDEX, HEXAHOST_LINKS
|
||||
from discord.ui import LayoutView, TextDisplay, Separator, Container, ActionRow, Select
|
||||
from discord.ext import commands
|
||||
from utils.Tools import get_ignore_data
|
||||
@@ -44,7 +44,7 @@ class MentionSelectView(LayoutView):
|
||||
),
|
||||
discord.SelectOption(
|
||||
label="Links",
|
||||
emoji=ZYROXLINKS,
|
||||
emoji=HEXAHOST_LINKS,
|
||||
description="Useful bot links",
|
||||
),
|
||||
],
|
||||
@@ -88,7 +88,7 @@ class MentionSelectView(LayoutView):
|
||||
elif selected == "Links":
|
||||
content = (
|
||||
f"**[Invite {BotName}](https://discord.com/oauth2/authorize?client_id=1396114795102470196)**\n"
|
||||
"**[Join Support Server](https://discord.gg/codexdev)**"
|
||||
"**[Join Support Server](https://discord.gg/hexahost)**"
|
||||
)
|
||||
|
||||
new_container = Container(
|
||||
@@ -111,7 +111,7 @@ class Mention(commands.Cog):
|
||||
self.bot_name = BotName
|
||||
|
||||
async def is_blacklisted(self, message):
|
||||
async with aiosqlite.connect("db/block.db") as db:
|
||||
async with aiosqlite.connect(db_path("block.db")) as db:
|
||||
cursor = await db.execute(
|
||||
"SELECT 1 FROM guild_blacklist WHERE guild_id = ?", (message.guild.id,)
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ class Mention(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.color = 0xFF0000
|
||||
self.bot_name = "Zyrox X"
|
||||
self.bot_name = "HexaHost"
|
||||
|
||||
async def is_blacklisted(self, message):
|
||||
async with aiosqlite.connect("db/block.db") as db:
|
||||
@@ -53,11 +53,11 @@ class Mention(commands.Cog):
|
||||
description=f"> {HEART3} **Hey {message.author.mention}**\n> {ARROWRED} **Prefix For This Server `{prefix}`**\n\n___Type `{prefix}help` for more information.___"
|
||||
)
|
||||
embed.set_thumbnail(url=self.bot.user.avatar.url)
|
||||
embed.set_footer(text="Powered by Zyrox Development™", icon_url=self.bot.user.avatar.url)
|
||||
embed.set_footer(text="Powered by HexaHost Development™", icon_url=self.bot.user.avatar.url)
|
||||
|
||||
buttons = [
|
||||
discord.ui.Button(label="Invite", style=discord.ButtonStyle.link, url="https://discord.com/oauth2/authorize?client_id=1396114795102470196&permissions=8&integration_type=0&scope=bot+applications.commands"),
|
||||
discord.ui.Button(label="Support", style=discord.ButtonStyle.link, url="https://discord.gg/codexdev"),
|
||||
discord.ui.Button(label="Support", style=discord.ButtonStyle.link, url="https://discord.gg/hexahost"),
|
||||
]
|
||||
|
||||
view = discord.ui.View()
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 discord.ext import commands
|
||||
from core import zyrox, Cog
|
||||
from core import HexaHost, Cog
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, KING, ZBOT, ZHUMAN, ZROCKET
|
||||
import logging
|
||||
@@ -26,16 +25,14 @@ logging.basicConfig(
|
||||
datefmt="%H:%M:%S",
|
||||
)
|
||||
|
||||
client = zyrox()
|
||||
|
||||
|
||||
class Guild(Cog):
|
||||
def __init__(self, client: zyrox):
|
||||
def __init__(self, client: HexaHost):
|
||||
self.client = client
|
||||
self.bot = client
|
||||
self.recently_removed_guilds = set()
|
||||
self._removal_timestamps = {}
|
||||
|
||||
@client.event
|
||||
@commands.Cog.listener(name="on_guild_join")
|
||||
async def on_guild_add(self, guild):
|
||||
try:
|
||||
@@ -102,7 +99,7 @@ Threads : {len(guild.threads)}
|
||||
await guild.chunk()
|
||||
|
||||
embed = discord.Embed(
|
||||
description=f"{ARROWRED} Prefix For This Server is `>`\n{ARROWRED} Get Started with `>help`\n{ARROWRED} For detailed guides, FAQ & information, visit our **[Support Server](https://discord.gg/codexdev)**",
|
||||
description=f"{ARROWRED} Prefix For This Server is `>`\n{ARROWRED} Get Started with `>help`\n{ARROWRED} For detailed guides, FAQ & information, visit our **[Support Server](https://discord.gg/hexahost)**",
|
||||
color=0xFF0000,
|
||||
)
|
||||
embed.set_author(
|
||||
@@ -117,7 +114,7 @@ Threads : {len(guild.threads)}
|
||||
support = Button(
|
||||
label="Support",
|
||||
style=discord.ButtonStyle.link,
|
||||
url=f"https://discord.gg/codexdev",
|
||||
url=f"https://discord.gg/hexahost",
|
||||
)
|
||||
|
||||
view = View()
|
||||
@@ -142,7 +139,6 @@ Threads : {len(guild.threads)}
|
||||
except Exception as e:
|
||||
logging.error(f"Error in on_guild_join: {e}")
|
||||
|
||||
@client.event
|
||||
@commands.Cog.listener(name="on_guild_remove")
|
||||
async def on_guild_remove(self, guild):
|
||||
import time
|
||||
@@ -218,6 +214,3 @@ Threads : {len(guild.threads)}
|
||||
await idk.send(embed=embed)
|
||||
except Exception as e:
|
||||
logging.error(f"Error in on_guild_remove: {e}")
|
||||
|
||||
|
||||
# client.add_cog(Guild(client))
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |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 ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
|
||||
@@ -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
|
||||
import aiosqlite
|
||||
@@ -37,7 +37,7 @@ class StickyMessageListener(commands.Cog):
|
||||
if message.channel.id in self.processing_channels:
|
||||
return
|
||||
|
||||
async with aiosqlite.connect("db/stickymessages.db") as db:
|
||||
async with aiosqlite.connect(db_path("stickymessages.db")) as db:
|
||||
cursor = await db.execute("""
|
||||
SELECT id, message_type, message_content, embed_data, last_message_id,
|
||||
enabled, delay_seconds, auto_delete_after, ignore_bots,
|
||||
@@ -84,7 +84,7 @@ class StickyMessageListener(commands.Cog):
|
||||
)
|
||||
|
||||
if new_sticky_msg:
|
||||
async with aiosqlite.connect("db/stickymessages.db") as db:
|
||||
async with aiosqlite.connect(db_path("stickymessages.db")) as db:
|
||||
await db.execute("""
|
||||
UPDATE sticky_messages
|
||||
SET last_message_id = ?
|
||||
@@ -106,7 +106,7 @@ class StickyMessageListener(commands.Cog):
|
||||
|
||||
async def get_prefix(self, message):
|
||||
try:
|
||||
async with aiosqlite.connect("db/prefix.db") as db:
|
||||
async with aiosqlite.connect(db_path("prefix.db")) as db:
|
||||
cursor = await db.execute(
|
||||
"SELECT prefix FROM prefix WHERE guild_id = ?",
|
||||
(message.guild.id,)
|
||||
@@ -117,7 +117,7 @@ class StickyMessageListener(commands.Cog):
|
||||
return "!"
|
||||
|
||||
async def update_counter(self, guild_id, channel_id, new_count):
|
||||
async with aiosqlite.connect("db/stickymessages.db") as db:
|
||||
async with aiosqlite.connect(db_path("stickymessages.db")) as db:
|
||||
await db.execute("""
|
||||
UPDATE sticky_messages
|
||||
SET current_count = ?
|
||||
@@ -179,7 +179,7 @@ class StickyMessageListener(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_guild_channel_delete(self, channel):
|
||||
try:
|
||||
async with aiosqlite.connect("db/stickymessages.db") as db:
|
||||
async with aiosqlite.connect(db_path("stickymessages.db")) as db:
|
||||
await db.execute(
|
||||
"DELETE FROM sticky_messages WHERE channel_id = ?",
|
||||
(channel.id,)
|
||||
@@ -191,7 +191,7 @@ class StickyMessageListener(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_guild_remove(self, guild):
|
||||
try:
|
||||
async with aiosqlite.connect("db/stickymessages.db") as db:
|
||||
async with aiosqlite.connect(db_path("stickymessages.db")) as db:
|
||||
await db.execute(
|
||||
"DELETE FROM sticky_messages WHERE guild_id = ?",
|
||||
(guild.id,)
|
||||
|
||||
Reference in New Issue
Block a user