Skip to content

Commit

Permalink
fixing nonetype error (#27)
Browse files Browse the repository at this point in the history
this *should* fix the NoneType errors.
  • Loading branch information
TheMoksej authored Jul 31, 2020
1 parent 350c8f4 commit 995590b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogs/tickets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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']})")

Expand Down

0 comments on commit 995590b

Please sign in to comment.