Update invite links to use dynamic Discord client ID and import necessary configuration constants. Refactor slash command synchronization logic for improved error handling and performance.
This commit is contained in:
@@ -86,7 +86,7 @@ class AvatarView(View):
|
||||
await interaction.response.edit_message(embed=embed)
|
||||
|
||||
|
||||
from utils.config import BotName
|
||||
from utils.config import BotName, DISCORD_CLIENT_ID
|
||||
|
||||
class General(commands.Cog):
|
||||
|
||||
@@ -309,7 +309,7 @@ class General(commands.Cog):
|
||||
invite_text = (
|
||||
"```Empower your server with blazing-fast features and 24/7 support!```\n"
|
||||
f"{AXIOM_LINKS} **Quick Actions**\n"
|
||||
f">>> **[Invite {BotName}](https://discord.com/oauth2/authorize?client_id=1396114795102470196&permissions=8&integration_type=0&scope=bot+applications.commands)**\n"
|
||||
f">>> **[Invite {BotName}](https://discord.com/oauth2/authorize?client_id={DISCORD_CLIENT_ID or (ctx.bot.user.id if ctx.bot.user else '')}&permissions=8&integration_type=0&scope=bot%20applications.commands)**\n"
|
||||
"**[Support Server](https://discord.gg/hexahost)**"
|
||||
)
|
||||
await ctx.send(view=CV2(f"{AXIOM_CONNECTION} {BotName} Integration Hub!", invite_text))
|
||||
@@ -13,7 +13,7 @@
|
||||
from utils.db_paths import db_path
|
||||
|
||||
from utils import getConfig
|
||||
from utils.config import BotName
|
||||
from utils.config import BotName, DISCORD_CLIENT_ID
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, CODEBASE, HEART3, INDEX, AXIOM_LINKS
|
||||
from discord.ui import LayoutView, TextDisplay, Separator, Container, ActionRow, Select
|
||||
@@ -87,7 +87,7 @@ class MentionSelectView(LayoutView):
|
||||
)
|
||||
elif selected == "Links":
|
||||
content = (
|
||||
f"**[Invite {BotName}](https://discord.com/oauth2/authorize?client_id=1396114795102470196)**\n"
|
||||
f"**[Invite {BotName}](https://discord.com/oauth2/authorize?client_id={DISCORD_CLIENT_ID or (self.bot.user.id if self.bot.user else '')}&permissions=8&scope=bot%20applications.commands)**\n"
|
||||
"**[Join Support Server](https://discord.gg/hexahost)**"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user