From 0c7868309093b0982cd2b7e78194ee8de3a73cc2 Mon Sep 17 00:00:00 2001 From: eek7574 Date: Wed, 23 Nov 2022 15:11:23 +0000 Subject: [PATCH] I hate tags --- cogs/assignments.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cogs/assignments.py b/cogs/assignments.py index ce9b9a6..c61697f 100644 --- a/cogs/assignments.py +++ b/cogs/assignments.py @@ -370,6 +370,7 @@ class AssignmentsCog(commands.Cog): else: option = 10080 name = textwrap.shorten(modal.create_kwargs["title"], width=100, placeholder="...") + tag = discord.utils.get(channel.available_tags, name=modal.create_kwargs['tutor'].name.title()) await channel.create_thread( name=name, content="Assignment name: {0}\nDue: {1} ({4})\nTutor: {2}\nCreated by: {3}".format( @@ -382,9 +383,7 @@ class AssignmentsCog(commands.Cog): discord.utils.format_dt(due_dt, "R") ), auto_archive_duration=option, - applied_tags=[ - discord.utils.get(channel.available_tags, name=modal.create_kwargs['tutor'].name) - ] + applied_tags=[tag] if tag else [], ) except discord.HTTPException: pass