From 72b3e6c2ac5b7a48880ef3c20915b880111a05a4 Mon Sep 17 00:00:00 2001 From: Bugs Date: Sun, 18 Feb 2024 12:21:40 +0000 Subject: [PATCH] error handling on dming modmail --- Cogs/Events/AstroSupport/blacklist.py | 2 +- Cogs/Modules/modmail.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cogs/Events/AstroSupport/blacklist.py b/Cogs/Events/AstroSupport/blacklist.py index 3eb5483b..977fb0e0 100644 --- a/Cogs/Events/AstroSupport/blacklist.py +++ b/Cogs/Events/AstroSupport/blacklist.py @@ -17,7 +17,7 @@ async def on_guild_join(self, guild): if blacklist: await guild.leave() - print(f'Left guild {guild.name} owned by blacklisted user {guild.owner}') + print(f'Left guild {guild.name} owned by blacklisted user {guild.owner.name}') else: pass diff --git a/Cogs/Modules/modmail.py b/Cogs/Modules/modmail.py index 839bae88..571cf513 100644 --- a/Cogs/Modules/modmail.py +++ b/Cogs/Modules/modmail.py @@ -210,8 +210,8 @@ async def close2(self, ctx, *, reason = None): embed.add_field(name="<:reason:1202773873095868476> Reason", value=reason, inline=True) await user.send(f"{tick} Your modmail channel has been closed.", embed=embed) except discord.Forbidden: - - pass + print("Couldn't send message to user.") + pass transcriptchannelresult = await transcriptschannel.find_one({'guild_id': ctx.guild.id}) if transcriptchannelresult: transcriptchannelid = transcriptchannelresult['channel_id']