feat: added more to the managed role thing

This commit is contained in:
Seaswimmer 2023-08-08 21:31:56 -04:00
parent c164b68973
commit a9312b4fe4
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -526,7 +526,16 @@ class Info(commands.Cog):
color = re.sub('#',"",str(role.color)) color = re.sub('#',"",str(role.color))
colorcodelink = f"https://www.color-hex.com/color/{color}" colorcodelink = f"https://www.color-hex.com/color/{color}"
timestamp = int(datetime.timestamp(role.created_at)) timestamp = int(datetime.timestamp(role.created_at))
embed = discord.Embed(title=f"{role.name}", color=colorint, description=f"**ID:** {role.id}\n**Mention:** {role.mention}\n**Creation Date:** <t:{timestamp}>\n**Color:** [#{color}]({colorcodelink})\n**Hoisted:** {role.hoist}\n**Position:** {role.position}\n**Managed:** {role.managed}\n**Mentionable:** {role.mentionable}\n**Administrator:** {permissions.administrator}") if role.managed is True:
managed_status = "True"
if role.is_premium_subscriber() is True:
managed_status = + "\n - **Type:** Nitro Booster Role"
if role.is_bot_managed() is True:
managed_status = + "\n - **Type:** Managed Bot Role"
else:
managed_status = "False"
description = f"**ID:** {role.id}\n**Mention:** {role.mention}\n**Creation Date:** <t:{timestamp}>\n**Color:** [#{color}]({colorcodelink})\n**Hoisted:** {role.hoist}\n**Position:** {role.position}\n**Managed:** {managed_status}\n**Mentionable:** {role.mentionable}\n**Administrator:** {permissions.administrator}"
embed = discord.Embed(title=f"{role.name}", color=colorint, description=description)
if icon_url: if icon_url:
embed.set_thumbnail(url=icon_url) embed.set_thumbnail(url=icon_url)
if permissions.administrator == False and list_permissions == True: if permissions.administrator == False and list_permissions == True: