From 1d1795c26224806dfe97ae4f525661e59c88d18b Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 3 May 2024 21:42:02 -0400 Subject: [PATCH] fix(aurora): added addrole/removerole support to case_factory --- aurora/utilities/factory.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/aurora/utilities/factory.py b/aurora/utilities/factory.py index af827e8..d7f4eb7 100644 --- a/aurora/utilities/factory.py +++ b/aurora/utilities/factory.py @@ -2,16 +2,12 @@ from datetime import datetime, timedelta from typing import Union -from discord import (Color, Embed, Guild, Interaction, InteractionMessage, - Member, Role, User) +from discord import Color, Embed, Guild, Interaction, InteractionMessage, Member, Role, User from redbot.core import commands -from redbot.core.utils.chat_formatting import (bold, box, error, - humanize_timedelta, warning) +from redbot.core.utils.chat_formatting import bold, box, error, humanize_timedelta, warning from aurora.utilities.config import config -from aurora.utilities.utils import (fetch_channel_dict, fetch_user_dict, - get_bool_emoji, get_next_case_number, - get_pagesize_str) +from aurora.utilities.utils import fetch_channel_dict, fetch_user_dict, get_bool_emoji, get_next_case_number, get_pagesize_str async def message_factory( @@ -273,6 +269,9 @@ async def case_factory(interaction: Interaction, case_dict: dict) -> Embed: else "\n**Changes:** 0" ) + if case_dict["role_id"]: + embed.description += f"\n**Role:** <@&{case_dict['role_id']}>" + if case_dict["metadata"]: if case_dict["metadata"]["imported_from"]: embed.description += (