diff --git a/cogs/general/botinfo.py b/cogs/general/botinfo.py index d566a81..47cf10b 100644 --- a/cogs/general/botinfo.py +++ b/cogs/general/botinfo.py @@ -32,7 +32,10 @@ class BotInfo(commands.Cog, name="botinfo"): value=f"/ (Slash Commands) or {self.bot.bot_prefix} for normal commands", inline=False, ) - await context.send(embed=embed) + if context.interaction: + await context.interaction.response.send_message(embed=embed, ephemeral=True) + else: + await context.send(embed=embed) async def setup(bot) -> None: await bot.add_cog(BotInfo(bot)) \ No newline at end of file diff --git a/cogs/general/invite.py b/cogs/general/invite.py index a40ee15..1cbfc92 100644 --- a/cogs/general/invite.py +++ b/cogs/general/invite.py @@ -6,6 +6,7 @@ Description: Version: 6.4.0 """ +import os import discord from discord.ext import commands from discord.ext.commands import Context @@ -25,10 +26,18 @@ class Invite(commands.Cog, name="invite"): :param context: The hybrid command context. """ - embed = discord.Embed( - description=f"Invite me by clicking [here]({self.bot.invite_link}).", - color=0xD75BF4, + client = self.bot.user + if client is None: + await context.send("Bot is not ready. Try again shortly.") + return + permissions = os.getenv("INVITE_PERMISSIONS", "0") + invite_url = ( + f"https://discord.com/api/oauth2/authorize?client_id={client.id}" + f"&scope=bot%20applications.commands&permissions={permissions}" ) + embed = discord.Embed(description=f"Invite me by clicking [here]({invite_url}).", color=0x7289DA) + embed.set_author(name="Invite Me", icon_url="https://yes.nighty.works/raw/y5SEZ9.webp") + try: await context.author.send(embed=embed) await context.send("I sent you a private message!") diff --git a/cogs/general/ping.py b/cogs/general/ping.py index b012348..445a25f 100644 --- a/cogs/general/ping.py +++ b/cogs/general/ping.py @@ -30,6 +30,7 @@ class Ping(commands.Cog, name="ping"): description=f"The bot latency is {round(self.bot.latency * 1000)}ms.", color=0xBEBEFE, ) + embed.set_author(name="Ping", icon_url="https://yes.nighty.works/raw/y5SEZ9.webp") await context.send(embed=embed)