Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsbirb committed Sep 25, 2024
1 parent 2ad5a82 commit da4cd2a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Cogs/Modules/infractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,15 @@ async def infract(
content=f"{crisis} **{ctx.author.display_name},** I'm sorry to say but the infraction channel is not setup if you wanna use this run `/config`!",
allowed_mentions=discord.AllowedMentions.none(),
)

channel = await self.client.fetch_channel(
Settings.get("Channel").get("channel_id")
)
try:
channel = await self.client.fetch_channel(
Settings.get("Channel").get("channel_id")
)
except discord.NotFound:
return await msg.edit(
content=f"{crisis} **{ctx.author.display_name},** hey I can't find your infraction channel it is configured but I can't find it?",
allowed_mentions=discord.AllowedMentions.none(),
)
if not channel:
return await msg.edit(
content=f"{crisis} **{ctx.author.display_name},** hey I can't find your infraction channel it is configured but I can't find it?",
Expand Down

0 comments on commit da4cd2a

Please sign in to comment.