From 73535e283d84ce5f422f7a1340b5d4b16631b751 Mon Sep 17 00:00:00 2001 From: neoarz Date: Fri, 3 Oct 2025 18:30:27 -0400 Subject: [PATCH] refactor(invite): command message handling Refactored the invite command to always send the invite embed in the current context instead of attempting to DM the user first. This removes the try/except logic and ensures consistent behavior. --- cogs/owner/invite.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cogs/owner/invite.py b/cogs/owner/invite.py index 851c4d1..9ec15fa 100644 --- a/cogs/owner/invite.py +++ b/cogs/owner/invite.py @@ -40,11 +40,7 @@ class Invite(commands.Cog, name="invite"): embed = discord.Embed(title="Install", description=f"Install me by clicking [here]({invite_link}).", color=0x7289DA) embed.set_author(name="Owner", icon_url="https://yes.nighty.works/raw/zReOib.webp") - try: - await context.author.send(embed=embed) - await self.send_embed(context, discord.Embed(description="I sent you a private message!", color=0x7289DA), ephemeral=True) - except discord.Forbidden: - await self.send_embed(context, embed, ephemeral=True) + await self.send_embed(context, embed, ephemeral=False) async def cog_command_error(self, context: Context, error) -> None: if isinstance(error, commands.NotOwner):