From 995590bf7b5142752ff764191327ce0a901e8bf8 Mon Sep 17 00:00:00 2001 From: Moksej <58531286+TheMoksej@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:24:35 +0200 Subject: [PATCH] fixing nonetype error (#27) this *should* fix the NoneType errors. --- cogs/tickets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/tickets.py b/cogs/tickets.py index 2b22e37..d0d3e1b 100644 --- a/cogs/tickets.py +++ b/cogs/tickets.py @@ -186,7 +186,7 @@ async def close_ticket(self, ctx, *, reason: str): f"long. (`{len(reason) / 500}`)") if message_id: - bot = ctx.guild.get_member(int(message_id["ids"]["bot"])) + channel_name = ctx.channel.name messages = [] for message in await ctx.channel.history().flatten(): @@ -209,7 +209,7 @@ async def close_ticket(self, ctx, *, reason: str): embed = log_message.embeds[0] embed.colour = self.closed embed.remove_field(0) - embed.insert_field_at(0, name="Channel", value=f"[#{bot.name.lower()}](https://txt.discord.website/?txt=" + embed.insert_field_at(0, name="Channel", value=f"[#{channel_name}](https://txt.discord.website/?txt=" f"{self.bot.settings['channels']['messageLog']}" f"/{message_history.attachments[0].id}/{message_id['_id']})")