Finish the addrole/removerole commands and surrounding functionality #24

Merged
cswimr merged 22 commits from addrole into main 2024-05-03 21:46:14 -04:00
Showing only changes of commit 1d1795c262 - Show all commits

View file

@ -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 += (