From cb419d35ab100a4c10c1f96becb4a65f16947498 Mon Sep 17 00:00:00 2001 From: Bugs Date: Wed, 6 Mar 2024 18:08:29 +0000 Subject: [PATCH] Better design stuff --- Cogs/Configuration/Configuration.py | 6 ++-- .../Configuration/Views/CustomCommandsView.py | 2 +- Cogs/Configuration/Views/loaview.py | 2 +- Cogs/Modules/adminpanel.py | 28 +++++++++---------- Cogs/Modules/astro.py | 10 +++---- Cogs/Modules/datamanage.py | 2 +- Cogs/Modules/forumutils.py | 2 +- Cogs/Modules/infractions.py | 10 +++---- Cogs/Modules/loa.py | 8 +++--- Cogs/Modules/reports.py | 2 +- Cogs/Modules/staff.py | 14 +++++----- Cogs/Modules/stafffeedback.py | 9 +++--- Cogs/Modules/stafflist.py | 2 +- Cogs/Modules/suggestions.py | 4 +-- Cogs/Modules/suspension.py | 8 +++--- Cogs/Modules/utility.py | 6 ++-- emojis.py | 7 ++++- 17 files changed, 64 insertions(+), 58 deletions(-) diff --git a/Cogs/Configuration/Configuration.py b/Cogs/Configuration/Configuration.py index ce518028..22ac892a 100644 --- a/Cogs/Configuration/Configuration.py +++ b/Cogs/Configuration/Configuration.py @@ -184,7 +184,7 @@ def __init__(self, author): discord.SelectOption(label="Connection Roles", value="Connection Roles", emoji="<:Role:1162074735803387944>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Connection': True}) else "Disabled"), discord.SelectOption(label="Suspensions", value="Suspensions", emoji="<:Suspensions:1167093139845165229>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Suspensions': True}) else "Disabled"), discord.SelectOption(label="Utility", value="Utility", emoji="<:Folder:1148813584957194250>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Utility': True}) else "Disabled"), - discord.SelectOption(label="LOA", value="LOA", emoji="<:LOA:1164969910238203995>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'LOA': True}) else "Disabled"), + discord.SelectOption(label="LOA", value="LOA", emoji=f"{loa}", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'LOA': True}) else "Disabled"), discord.SelectOption(label="Staff Feedback", value="Staff Feedback", emoji="<:Rate:1162135093129785364>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Feedback': True}) else "Disabled"), discord.SelectOption(label="Partnerships", value="Partnerships", emoji="<:Partner:1162135285031772300>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Partnerships': True}) else "Disabled"), discord.SelectOption(label="Reports", value="Reports", emoji="<:Moderation:1163933000006893648>", description="Enabled" if modules.find_one({'guild_id': author.guild.id, 'Reports': True}) else "Disabled"), @@ -337,7 +337,7 @@ async def callback(self, interaction: discord.Interaction): loachannelmsg = "<:Error:1126526935716085810> Channel wasn't found please reconfigure." else: loachannelmsg = channel.mention - embed = discord.Embed(title="<:LOA:1164969910238203995> LOA Module", color=discord.Color.dark_embed()) + embed = discord.Embed(title=f"{loa} LOA Module", color=discord.Color.dark_embed()) embed.add_field(name="<:settings:1207368347931516928> LOA Configuration", value=f"{replytop}**Enabled:** {modulemsg}\n{replymiddle}**LOA Channel:** {loachannelmsg}\n{replybottom}**LOA Role:** {loarolemsg}\n\n<:Tip:1167083259444875264> If you need help either go to the [support server](https://discord.gg/36xwMFWKeC) or read the [documentation](https://docs.astrobirb.dev)", inline=False) view = LOAModule(self.author) embed.set_thumbnail(url=interaction.guild.icon) @@ -578,7 +578,7 @@ async def callback(self, interaction: discord.Interaction): permissions = "None" else: permissions = ", ".join([f"<@&{roleid}>" for roleid in permissions]) - embed.add_field(name=f"<:command1:1199456319363633192> {result['name']}", value=f"<:arrow:1166529434493386823> **Created By:** <@{result['creator']}>\n<:arrow:1166529434493386823> **Required Permissions:** {permissions}", inline=False) + embed.add_field(name=f"<:command1:1199456319363633192> {result['name']}", value=f"{arrow}> **Created By:** <@{result['creator']}>\n{arrow}> **Required Permissions:** {permissions}", inline=False) view = CustomCommands(self.author) diff --git a/Cogs/Configuration/Views/CustomCommandsView.py b/Cogs/Configuration/Views/CustomCommandsView.py index 4809d9a3..56cfbc35 100644 --- a/Cogs/Configuration/Views/CustomCommandsView.py +++ b/Cogs/Configuration/Views/CustomCommandsView.py @@ -839,7 +839,7 @@ async def refreshembed(interaction): permissions = "None" else: permissions = ", ".join([f"<@&{roleid}>" for roleid in permissions]) - embed.add_field(name=f"<:command1:1199456319363633192> {result['name']}", value=f"<:arrow:1166529434493386823> **Created By:** <@{result['creator']}>\n<:arrow:1166529434493386823> **Required Permissions:** {permissions}", inline=False) + embed.add_field(name=f"<:command1:1199456319363633192> {result['name']}", value=f"{arrow}> **Created By:** <@{result['creator']}>\n{arrow}> **Required Permissions:** {permissions}", inline=False) try: await interaction.message.edit(embed=embed) except: diff --git a/Cogs/Configuration/Views/loaview.py b/Cogs/Configuration/Views/loaview.py index 2f424985..f7388a4a 100644 --- a/Cogs/Configuration/Views/loaview.py +++ b/Cogs/Configuration/Views/loaview.py @@ -149,7 +149,7 @@ async def refreshembed(interaction): loachannelmsg = "<:Error:1126526935716085810> Channel wasn't found please reconfigure." else: loachannelmsg = channel.mention - embed = discord.Embed(title="<:LOA:1164969910238203995> LOA Module", color=discord.Color.dark_embed()) + embed = discord.Embed(title="{loa} LOA Module", color=discord.Color.dark_embed()) embed.add_field(name="<:settings:1207368347931516928> LOA Configuration", value=f"{replytop}**Enabled:** {modulemsg}\n{replymiddle}**LOA Channel:** {loachannelmsg}\n{replybottom}**LOA Role:** {loachannelmsg}\n\n<:Tip:1167083259444875264> If you need help either go to the [support server](https://discord.gg/36xwMFWKeC) or read the [documentation](https://docs.astrobirb.dev)", inline=False) embed.set_thumbnail(url=interaction.guild.icon) embed.set_author(name=interaction.guild.name, icon_url=interaction.guild.icon) diff --git a/Cogs/Modules/adminpanel.py b/Cogs/Modules/adminpanel.py index 33c7a80e..e153dbc1 100644 --- a/Cogs/Modules/adminpanel.py +++ b/Cogs/Modules/adminpanel.py @@ -538,7 +538,7 @@ async def on_submit(self, interaction: discord.Interaction): if consent_data["infractionalert"] == "Enabled": try: await self.user.send( - f"<:SmallArrow:1140288951861649418> From **{interaction.guild.name}**", + f"{smallarrow} From **{interaction.guild.name}**", embed=embed, ) except discord.Forbidden: @@ -658,7 +658,7 @@ async def panel(self, ctx, staff: discord.Member): ) embed.add_field( name="<:data:1166529224094523422> Staff Data", - value=f"<:arrow:1166529434493386823>**Infractions:** {infractions}\n<:arrow:1166529434493386823>**Demotions:** {demotions}\n<:arrow:1166529434493386823>**Leave Of Absence:** {loamsg}", + value=f"{arrow}>**Infractions:** {infractions}\n{arrow}>**Demotions:** {demotions}\n{arrow}>**Leave Of Absence:** {loamsg}", ) embed.set_author(name=staff.name, icon_url=staff.display_avatar) embed.set_footer( @@ -813,7 +813,7 @@ async def InfractionsView( embed.add_field( name=f"<:Document:1166803559422107699> Infraction | {infraction_info['id']}", - value=f"<:arrow:1166529434493386823>**Infracted User:** <@{infraction_info['staff']}>\n<:arrow:1166529434493386823>**Action:** {infraction_info['action']}\n<:arrow:1166529434493386823>**Reason:** {infraction_info['reason']}\n<:arrow:1166529434493386823>**Notes:** {infraction_info['notes']}", + value=f"{arrow}>**Infracted User:** <@{infraction_info['staff']}>\n{arrow}>**Action:** {infraction_info['action']}\n{arrow}>**Reason:** {infraction_info['reason']}\n{arrow}>**Notes:** {infraction_info['notes']}", inline=False, ) @@ -1003,18 +1003,18 @@ async def Search(self, interaction: discord.Interaction, button: discord.ui.Butt if infraction_info["jump_url"] == "N/A": jump_url = "" else: - jump_url = f"\n<:arrow:1166529434493386823>**[Jump to Infraction]({infraction_info['jump_url']})**" + jump_url = f"\n{arrow}>**[Jump to Infraction]({infraction_info['jump_url']})**" if infraction_info["expiration"] == "N/A": expiration = "" else: - expiration = f"\n<:arrow:1166529434493386823>**Expiration:** " + expiration = f"\n{arrow}>**Expiration:** " if infraction_info["expiration"] < datetime.now(): - expiration = f"\n<:arrow:1166529434493386823>**Expiration:** **(Infraction Expired)**" + expiration = f"\n{arrow}>**Expiration:** **(Infraction Expired)**" management = f"<@{infraction_info['management']}>" embed.add_field( name=f"<:Document:1166803559422107699> Infraction | {infraction_info['id']}", - value=f"<:arrow:1166529434493386823>**Infracted By:** {management}\n<:arrow:1166529434493386823>**Action:** {infraction_info['action']}\n<:arrow:1166529434493386823>**Reason:** {infraction_info['reason']}\n<:arrow:1166529434493386823>**Notes:** {infraction_info['notes']}{expiration}{jump_url}", + value=f"{arrow}>**Infracted By:** {management}\n{arrow}>**Action:** {infraction_info['action']}\n{arrow}>**Reason:** {infraction_info['reason']}\n{arrow}>**Notes:** {infraction_info['notes']}{expiration}{jump_url}", inline=False, ) @@ -1022,7 +1022,7 @@ async def Search(self, interaction: discord.Interaction, button: discord.ui.Butt await interaction.response.edit_message(embed=embed, view=view, content=None) @discord.ui.button( - label="LOA", style=discord.ButtonStyle.grey, emoji="<:LOA:1164969910238203995>" + label="LOA", style=discord.ButtonStyle.grey, emoji="{loa}" ) async def LOA(self, interaction: discord.Interaction, button: discord.ui.Button): if interaction.user.id != self.author.id: @@ -1052,7 +1052,7 @@ async def LOA(self, interaction: discord.Interaction, button: discord.ui.Button) end_time = request["end_time"] reason = request["reason"] description.append( - f"<:LOA:1164969910238203995> **Previous LOA**\n<:arrow:1166529434493386823> - • {reason}" + f"{loa} **Previous LOA**\n{arrow}> - • {reason}" ) embed = discord.Embed( @@ -1074,7 +1074,7 @@ async def LOA(self, interaction: discord.Interaction, button: discord.ui.Button) embed = discord.Embed( title=f"Leave Of Absence", color=discord.Color.dark_embed(), - description=f"<:LOA:1164969910238203995> **Active LOA**\n<:arrow:1166529434493386823>**Start Date:** \n<:arrow:1166529434493386823>**End Date:** \n<:arrow:1166529434493386823>**Reason:** {reason}", + description=f"{loa} **Active LOA**\n{arrow}>**Start Date:** \n{arrow}>**End Date:** \n{arrow}>**Reason:** {reason}", ) embed.set_thumbnail(url=self.user.display_avatar) embed.set_author( @@ -1143,7 +1143,7 @@ async def Return77(self, interaction: discord.Interaction, button: discord.ui.Bu embed.set_thumbnail(url=self.user.display_avatar) embed.add_field( name="<:data:1166529224094523422> Staff Data", - value=f"<:arrow:1166529434493386823>**Infractions:** {infractions}\n<:arrow:1166529434493386823>**Demotions:** {demotions}\n<:arrow:1166529434493386823>**Leave Of Absence:** {loamsg}", + value=f"{arrow}>**Infractions:** {infractions}\n{arrow}>**Demotions:** {demotions}\n{arrow}>**Leave Of Absence:** {loamsg}", ) view = AdminPanel(self.user, interaction.guild, self.author) embed.set_image( @@ -1261,7 +1261,7 @@ async def Return2( embed.set_thumbnail(url=self.user.display_avatar) embed.add_field( name="<:data:1166529224094523422> Staff Data", - value=f"<:arrow:1166529434493386823>**Infractions:** {infractions}\n<:arrow:1166529434493386823>**Demotions:** {demotions}\n<:arrow:1166529434493386823>**Leave Of Absence:** {loamsg}", + value=f"{arrow}>**Infractions:** {infractions}\n{arrow}>**Demotions:** {demotions}\n{arrow}>**Leave Of Absence:** {loamsg}", ) view = AdminPanel(self.user, interaction.guild, self.author) embed.set_image( @@ -1345,7 +1345,7 @@ async def Return3( embed.set_thumbnail(url=self.user.display_avatar) embed.add_field( name="<:data:1166529224094523422> Staff Data", - value=f"<:arrow:1166529434493386823>**Infractions:** {infractions}\n<:arrow:1166529434493386823>**Demotions:** {demotions}\n<:arrow:1166529434493386823>**Leave Of Absence:** {loamsg}", + value=f"{arrow}>**Infractions:** {infractions}\n{arrow}>**Demotions:** {demotions}\n{arrow}>**Leave Of Absence:** {loamsg}", ) view = AdminPanel(self.user, interaction.guild, self.author) embed.set_image( @@ -1437,7 +1437,7 @@ async def Return3( embed.set_thumbnail(url=self.user.display_avatar) embed.add_field( name="<:data:1166529224094523422> Staff Data", - value=f"<:arrow:1166529434493386823>**Infractions:** {infractions}\n<:arrow:1166529434493386823>**Demotions:** {demotions}\n<:arrow:1166529434493386823>**Leave Of Absence:** {loamsg}", + value=f"{arrow}>**Infractions:** {infractions}\n{arrow}>**Demotions:** {demotions}\n{arrow}>**Leave Of Absence:** {loamsg}", ) view = AdminPanel(self.user, interaction.guild, self.author) embed.set_image( diff --git a/Cogs/Modules/astro.py b/Cogs/Modules/astro.py index db2d6b36..56b94b56 100644 --- a/Cogs/Modules/astro.py +++ b/Cogs/Modules/astro.py @@ -21,11 +21,11 @@ class HelpdeskDropdown(discord.ui.Select): def __init__(self): options = [ - discord.SelectOption(label='Whats the servers rules?', emoji='<:arrow:1166529434493386823>'), - discord.SelectOption(label='What is Astro Birb?', emoji='<:arrow:1166529434493386823>'), - discord.SelectOption(label="How do I become staff here?", emoji="<:arrow:1166529434493386823>"), - discord.SelectOption(label="Wheres the documentation?", emoji="<:arrow:1166529434493386823>"), - discord.SelectOption(label="How do you setup the bot?", emoji="<:arrow:1166529434493386823>") + discord.SelectOption(label='Whats the servers rules?', emoji='{arrow}>'), + discord.SelectOption(label='What is Astro Birb?', emoji='{arrow}>'), + discord.SelectOption(label="How do I become staff here?", emoji="{arrow}>"), + discord.SelectOption(label="Wheres the documentation?", emoji="{arrow}>"), + discord.SelectOption(label="How do you setup the bot?", emoji="{arrow}>") diff --git a/Cogs/Modules/datamanage.py b/Cogs/Modules/datamanage.py index 59673ce6..938cd878 100644 --- a/Cogs/Modules/datamanage.py +++ b/Cogs/Modules/datamanage.py @@ -72,7 +72,7 @@ def __init__(self, author): discord.SelectOption(label="Tags", value="Tags", emoji="<:tag:1162134250414415922>"), # discord.SelectOption(label="Connection Roles", value="Connection Roles", emoji="<:Role:1162074735803387944>"), # discord.SelectOption(label="Suspensions", value="Suspensions", emoji="<:Suspensions:1167093139845165229>"), # - discord.SelectOption(label="LOA", value="LOA", emoji="<:LOA:1164969910238203995>"), # + discord.SelectOption(label="LOA", value="LOA", emoji=f"{loa}"), # discord.SelectOption(label="Staff Feedback", value="Staff Feedback", emoji="<:Rate:1162135093129785364>"), discord.SelectOption(label="Partnerships", value="Partnerships", emoji="<:Partner:1162135285031772300>"), # discord.SelectOption(label="Reports", value="Reports", emoji="<:Moderation:1163933000006893648>"), # diff --git a/Cogs/Modules/forumutils.py b/Cogs/Modules/forumutils.py index e5dc41a7..958285f5 100644 --- a/Cogs/Modules/forumutils.py +++ b/Cogs/Modules/forumutils.py @@ -350,7 +350,7 @@ async def manage(self, ctx): else: rolemention = f"<@&{role}>" - embed.add_field(name=f"<:Document:1166803559422107699> {result['name']}", value=f"<:arrow:1166529434493386823>**Channel:** <#{result['channel_id']}>\n<:arrow:1166529434493386823>**Role:** {rolemention}\n<:arrow:1166529434493386823>**Title:** {result['title']}\n<:arrow:1166529434493386823>**Description:** {result['description']}\n<:arrow:1166529434493386823>**Thumbnail:** {result['thumbnail']}", inline=False) + embed.add_field(name=f"<:Document:1166803559422107699> {result['name']}", value=f"{arrow}>**Channel:** <#{result['channel_id']}>\n{arrow}>**Role:** {rolemention}\n{arrow}>**Title:** {result['title']}\n{arrow}>**Description:** {result['description']}\n{arrow}>**Thumbnail:** {result['thumbnail']}", inline=False) embed.set_thumbnail(url=ctx.guild.icon) embed.set_author(name=f"{ctx.author.display_name}", icon_url=ctx.author.display_avatar) view = ForumsManage(ctx.author) diff --git a/Cogs/Modules/infractions.py b/Cogs/Modules/infractions.py index 4409501c..36cf174b 100644 --- a/Cogs/Modules/infractions.py +++ b/Cogs/Modules/infractions.py @@ -235,7 +235,7 @@ async def infract(self, ctx, staff: discord.Member, action, reason: str, notes: return if consent_data['infractionalert'] == "Enabled": try: - await staff.send(f"<:SmallArrow:1140288951861649418> From **{ctx.guild.name}**", embed=embed) + await staff.send(f"{smallarrow} From **{ctx.guild.name}**", embed=embed) except: print(f"Couldn't send infraction alert to {staff.display_name} in {ctx.guild.name}") pass @@ -328,18 +328,18 @@ async def infractions(self, ctx, staff: discord.Member, scope: Literal['Voided', if infraction.get('jump_url', 'N/A') == 'N/A': jump_url = "" else: - jump_url = f"\n<:arrow:1166529434493386823>**[Jump to Infraction]({infraction['jump_url']})**" + jump_url = f"\n{arrow}>**[Jump to Infraction]({infraction['jump_url']})**" if infraction.get('expiration', 'N/A') == 'N/A': expiration = "" else: - expiration = f"\n<:arrow:1166529434493386823>**Expiration:** " + expiration = f"\n{arrow}>**Expiration:** " if infraction['expiration'] < datetime.now(): - expiration = f"\n<:arrow:1166529434493386823>**Expiration:** **(Infraction Expired)**" + expiration = f"\n{arrow}>**Expiration:** **(Infraction Expired)**" management = await self.client.fetch_user(infraction['management']) embed.add_field( name=f"<:Document:1166803559422107699> Infraction | {infraction['random_string']} {voided}", - value=f"<:arrow:1166529434493386823>**Infracted By:** {management.mention}\n<:arrow:1166529434493386823>**Action:** {infraction['action']}\n<:arrow:1166529434493386823>**Reason:** {infraction['reason']}\n<:arrow:1166529434493386823>**Notes:** {infraction['notes']}{expiration}{jump_url}", + value=f"{arrow}>**Infracted By:** {management.mention}\n{arrow}>**Action:** {infraction['action']}\n{arrow}>**Reason:** {infraction['reason']}\n{arrow}>**Notes:** {infraction['notes']}{expiration}{jump_url}", inline=False ) diff --git a/Cogs/Modules/loa.py b/Cogs/Modules/loa.py index 58a1570d..1739c166 100644 --- a/Cogs/Modules/loa.py +++ b/Cogs/Modules/loa.py @@ -214,7 +214,7 @@ async def manage(self, ctx, user: discord.Member): end_time = request['end_time'] reason = request['reason'] description.append( - f"<:LOA:1164969910238203995> **Previous LOA**\n<:arrow:1166529434493386823> - • {reason}") + f"{loa} **Previous LOA**\n{arrow}> - • {reason}") embed = discord.Embed(title="Leave Of Absense", description=f"\n".join(description), color=discord.Color.dark_embed()) @@ -230,7 +230,7 @@ async def manage(self, ctx, user: discord.Member): embed = discord.Embed( title=f"Leave Of Absence", color=discord.Color.dark_embed(), - description=f"<:LOA:1164969910238203995> **Active LOA**\n<:arrow:1166529434493386823>**Start Date:** \n<:arrow:1166529434493386823>**End Date:** \n<:arrow:1166529434493386823>**Reason:** {reason}" + description=f"{loa} **Active LOA**\n{arrow}>**Start Date:** \n{arrow}>**End Date:** \n{arrow}>**Reason:** {reason}" ) embed.set_thumbnail(url=user.display_avatar) embed.set_author(icon_url=user.display_avatar, name=user.display_name) @@ -269,8 +269,8 @@ async def active(self, ctx): reason = request['reason'] embed.add_field( - name=f"<:LOA:1164969910238203995>{user.name.capitalize()}", - value=f"<:arrow:1166529434493386823>**Start Date:** \n<:arrow:1166529434493386823>**End Date:** \n<:arrow:1166529434493386823>**Reason:** {reason}", + name=f"{loa}{user.name.capitalize()}", + value=f"{arrow}>**Start Date:** \n{arrow}>**End Date:** \n{arrow}>**Reason:** {reason}", inline=False ) diff --git a/Cogs/Modules/reports.py b/Cogs/Modules/reports.py index 45aa36fb..ec1f0a9e 100644 --- a/Cogs/Modules/reports.py +++ b/Cogs/Modules/reports.py @@ -226,7 +226,7 @@ async def report(self, ctx, member: discord.User, *, reason: str, message_link: reported_at_format = f"" - embed = discord.Embed(title=f"<:Crisis:1190412318648062113> Pending Report", color=discord.Color.dark_embed()) + embed = discord.Embed(title=f"{crisis} Pending Report", color=discord.Color.dark_embed()) embed.add_field(name="Reported User", value=f"{replytop}**User:** {member.mention}\n{replybottom}**ID:** {member.id}", inline=False) embed.set_thumbnail(url=member.display_avatar.url) embed.set_author(name=ctx.guild.name, icon_url=ctx.guild.icon) diff --git a/Cogs/Modules/staff.py b/Cogs/Modules/staff.py index 75e81cc4..dbe36485 100644 --- a/Cogs/Modules/staff.py +++ b/Cogs/Modules/staff.py @@ -385,14 +385,14 @@ async def view(self, ctx, staff: discord.User): else: introduction = "" if result.get('timezone', None): - timezone = f"\n<:arrow:1166529434493386823> **Timezone:** {result['timezone']}" + timezone = f"\n{arrow}> **Timezone:** {result['timezone']}" else: timezone = "" if result: embed = discord.Embed( title=staff.display_name, - description=f"<:arrow:1166529434493386823> **Staff:** <@{staff.id}>\n<:arrow:1166529434493386823> **Rank:** {result['rolename']}{timezone}\n<:arrow:1166529434493386823> **Joined Staff:** {introduction}", + description=f"{arrow}> **Staff:** <@{staff.id}>\n{arrow}> **Rank:** {result['rolename']}{timezone}\n{arrow}> **Joined Staff:** {introduction}", color=discord.Color.dark_embed() ) embed.set_thumbnail(url=staff.display_avatar) @@ -523,7 +523,7 @@ async def callback(self, interaction: discord.Interaction): staff_names = [result['name'] for result in results] - names_str = '\n'.join([f"<:arrow:1166529434493386823> **{name}**" for name in staff_names]) + names_str = '\n'.join([f"{arrow}> **{name}**" for name in staff_names]) embed = discord.Embed(title='All Staff', description=names_str, color=discord.Color.dark_embed()) embed.set_author(name=interaction.guild.name, icon_url=interaction.guild.icon) embed.set_thumbnail(url=interaction.guild.icon) @@ -545,11 +545,11 @@ async def callback(self, interaction: discord.Interaction): if result.get('introduction') is not None: introduction = f"\n\n**Introduction:**\n```{result['introduction']}```" if result.get('timezone') is not None: - timezone = f"\n<:arrow:1166529434493386823> **Timezone:** {result['timezone']}" + timezone = f"\n{arrow}> **Timezone:** {result['timezone']}" embed = discord.Embed( title=staff.display_name, - description=f"<:arrow:1166529434493386823> **Staff:** <@{staff.id}>\n<:arrow:1166529434493386823> **Rank:** {result['rolename']}{timezone}\n<:arrow:1166529434493386823> **Joined Staff:** {introduction}", + description=f"{arrow}> **Staff:** <@{staff.id}>\n{arrow}> **Rank:** {result['rolename']}{timezone}\n{arrow}> **Joined Staff:** {introduction}", color=discord.Color.dark_embed() ) embed.set_thumbnail(url=staff.display_avatar) @@ -625,11 +625,11 @@ async def on_submit(self, interaction: discord.Interaction): if result.get('introduction') is not None: introduction = f"\n\n**Introduction:**\n```{result['introduction']}```" if result.get('timezone') is not None: - timezone = f"\n<:arrow:1166529434493386823> **Timezone:** {result['timezone']}" + timezone = f"\n{arrow}> **Timezone:** {result['timezone']}" embed = discord.Embed( title=staff.display_name, - description=f"<:arrow:1166529434493386823> **Staff:** <@{staff.id}>\n<:arrow:1166529434493386823> **Rank:** {result['rolename']}{timezone}\n<:arrow:1166529434493386823> **Joined Staff:** {introduction}", + description=f"{arrow}> **Staff:** <@{staff.id}>\n{arrow}> **Rank:** {result['rolename']}{timezone}\n{arrow}> **Joined Staff:** {introduction}", color=discord.Color.dark_embed() ) embed.set_thumbnail(url=staff.avatar.url) diff --git a/Cogs/Modules/stafffeedback.py b/Cogs/Modules/stafffeedback.py index f301c6d1..71cfb4aa 100644 --- a/Cogs/Modules/stafffeedback.py +++ b/Cogs/Modules/stafffeedback.py @@ -131,6 +131,7 @@ async def feedback2(self, ctx, staff: discord.Member, rating: Literal['1/10', '2 @feedback.command(description="View a staff members rating") async def ratings(self, ctx, staff: discord.Member, scope: Literal["global", "server"]): + if scope == "global": staff_ratings = stafffeedback.find({'staff': staff.id}).to_list(length=None) total_ratings = await stafffeedback.count_documents({'staff': staff.id}) @@ -156,9 +157,9 @@ async def ratings(self, ctx, staff: discord.Member, scope: Literal["global", "se rating_text = get_rating_text(average_rating) - embed = discord.Embed(title="", description=f"* **Average Rating**: {average_rating}/10\n* **Last Rating**: {last_rating}/10\n* **Overall**: {rating_text}", color=discord.Color.dark_embed()) + embed = discord.Embed(title=f"", description=f"* **Average Rating**: {average_rating}/10\n* **Last Rating**: {last_rating}/10\n* **Overall**: {rating_text}", color=discord.Color.dark_embed()) embed.set_thumbnail(url=staff.display_avatar) - embed.set_author(name=staff.display_name, icon_url=staff.display_avatar) + embed.set_author(name=f"{(scope).capitalize()} Ratings", icon_url=staff.display_avatar) view = ViewRatings(staff_ratings, staff, ctx, scope, ctx.author) await ctx.send(embed=embed, view=view) @@ -206,8 +207,8 @@ async def Ratings(self, interaction: discord.Interaction, button: discord.ui.But date_str = datetime.utcfromtimestamp(date).strftime('%d/%m/%Y') embed.add_field( - name=f"<:Star:1133346299668873216> {rating['rating']}/10", - value=f"<:arrow:1166529434493386823>**Date:** {date_str}\n<:arrow:1166529434493386823>**Feedback ID:** {Id}\n<:arrow:1166529434493386823>**Feedback:** {feedback}", + name=f"{star} {rating['rating']}/10", + value=f"{arrow}**Date:** {date_str}\n{arrow}**Feedback ID:** {Id}\n{arrow}**Feedback:** {feedback}", inline=False ) diff --git a/Cogs/Modules/stafflist.py b/Cogs/Modules/stafflist.py index 7fd93442..720b74d5 100644 --- a/Cogs/Modules/stafflist.py +++ b/Cogs/Modules/stafflist.py @@ -45,7 +45,7 @@ async def stafflist(self, ctx, display: Optional[Literal['True', 'False']]): role_mentions = set() for member in members: mention = member.mention - role_mentions.add(f"<:SmallArrow:1140288951861649418>{mention}") + role_mentions.add(f"{smallarrow}{mention}") if role_mentions: if role.name not in members_by_role: diff --git a/Cogs/Modules/suggestions.py b/Cogs/Modules/suggestions.py index a149ebd8..ed9c974b 100644 --- a/Cogs/Modules/suggestions.py +++ b/Cogs/Modules/suggestions.py @@ -94,7 +94,7 @@ async def Yes(self, interaction, button): message_id = interaction.message.id suggestion_data = await suggestions_collection.find_one({"message_id": message_id}) if suggestion_data is None: - await interaction.response.send_message(f"<:Crisis:1190412318648062113> **Suggestion** data for this suggestion can not be found.", ephemeral=True) + await interaction.response.send_message(f"{crisis} **Suggestion** data for this suggestion can not be found.", ephemeral=True) return upvoters = suggestion_data.get("upvoters", []) downvoters = suggestion_data.get("downvoters", []) @@ -139,7 +139,7 @@ async def No(self, interaction, button): message_id = interaction.message.id suggestion_data = await suggestions_collection.find_one({"message_id": message_id}) if suggestion_data is None: - await interaction.response.send_message(f"<:Crisis:1190412318648062113> **Suggestion** data for this suggestion can not be found.", ephemeral=True) + await interaction.response.send_message(f"{crisis} **Suggestion** data for this suggestion can not be found.", ephemeral=True) return upvoters = suggestion_data.get("upvoters", []) downvoters = suggestion_data.get("downvoters", []) diff --git a/Cogs/Modules/suspension.py b/Cogs/Modules/suspension.py index f0a0be55..7f1f3359 100644 --- a/Cogs/Modules/suspension.py +++ b/Cogs/Modules/suspension.py @@ -117,7 +117,7 @@ async def active(self, ctx): embed.add_field( name=f"<:Infraction:1162134605885870180>{user.name.capitalize()}", - value=f"<:arrow:1166529434493386823>**Start Date:** \n<:arrow:1166529434493386823>**End Date:** \n<:arrow:1166529434493386823>**Reason:** {reason}", + value=f"{arrow}>**Start Date:** \n{arrow}>**End Date:** \n{arrow}>**Reason:** {reason}", inline=False ) @@ -165,7 +165,7 @@ async def manage(self, ctx, staff: discord.Member): embed.add_field( name=f"<:Infraction:1162134605885870180>{user.name.capitalize()}", - value=f"<:arrow:1166529434493386823>**Start Date:** \n<:arrow:1166529434493386823>**End Date:** \n<:arrow:1166529434493386823>**Reason:** {reason}", + value=f"{arrow}>**Start Date:** \n{arrow}>**End Date:** \n{arrow}>**Reason:** {reason}", inline=False ) @@ -302,7 +302,7 @@ async def callback(self, interaction: discord.Interaction): return try: - await self.user.send(f"<:SmallArrow:1140288951861649418> From **{interaction.guild.name}**", embed=embed, view=None, allowed_mentions=discord.AllowedMentions.none()) + await self.user.send(f"{smallarrow} From **{interaction.guild.name}**", embed=embed, view=None, allowed_mentions=discord.AllowedMentions.none()) except: print('Failed to send suspension message to user') pass @@ -381,7 +381,7 @@ async def No(self, interaction: discord.Interaction, button: discord.ui.Button): await suspensions.insert_one(infract_data) await interaction.response.edit_message(content=f"{tick} **{interaction.user.display_name}**, I've suspended **@{self.user.display_name}**", view=None, embed=None, allowed_mentions=discord.AllowedMentions.none()) try: - await self.user.send(f"<:SmallArrow:1140288951861649418> From **{interaction.guild.name}**", embed=embed, view=None) + await self.user.send(f"{smallarrow} From **{interaction.guild.name}**", embed=embed, view=None) except: print('Failed to send suspension message to user') pass diff --git a/Cogs/Modules/utility.py b/Cogs/Modules/utility.py index 42122967..a14f4d19 100644 --- a/Cogs/Modules/utility.py +++ b/Cogs/Modules/utility.py @@ -28,7 +28,7 @@ def __init__(self, author): discord.SelectOption(label="Connection Roles", value="Connection Roles", emoji="<:Role:1162074735803387944>"), discord.SelectOption(label="Infractions", emoji="<:Remove:1162134605885870180>"), discord.SelectOption(label="Promotions", emoji="<:Promote:1162134864594735315>"), - discord.SelectOption(label="LOA", emoji="<:LOA:1164969910238203995>"), + discord.SelectOption(label="LOA", emoji=f"{loa}"), discord.SelectOption(label="Staff Feedback", emoji="<:Rate:1162135093129785364>"), discord.SelectOption(label="Partnerships", emoji="<:Partner:1162135285031772300>"), discord.SelectOption(label="Applications Results", emoji="<:ApplicationFeedback:1178754449125167254>"), @@ -126,7 +126,7 @@ def __init__(self, author): discord.SelectOption(label="Promotions", value="Promotions", emoji="<:Promote:1162134864594735315>"), discord.SelectOption(label="Configuration", value="Configuration", emoji="<:Setting:1154092651193323661>"), discord.SelectOption(label="Utility", value="Utility", emoji="<:Folder:1148813584957194250>"), - discord.SelectOption(label="LOA", value="LOA", emoji="<:LOA:1164969910238203995>"), + discord.SelectOption(label="LOA", value="LOA", emoji=f"{loa}"), discord.SelectOption(label="Staff Feedback", value="Staff Feedback", emoji="<:Rate:1162135093129785364>"), discord.SelectOption(label="Partnerships", value="Partnerships", emoji="<:Partner:1162135285031772300>") ] @@ -332,7 +332,7 @@ async def birb(self, ctx): await ctx.send(embed=embed) except aiohttp.ClientError as e: - await ctx.send(f"<:Crisis:1190412318648062113> {ctx.author.mention}, I couldn't get a birb image for you :c\n**Error:** `{e}`", allowed_mentions=discord.AllowedMentions.none()) + await ctx.send(f"{crisis} {ctx.author.mention}, I couldn't get a birb image for you :c\n**Error:** `{e}`", allowed_mentions=discord.AllowedMentions.none()) @commands.hybrid_command(description="Check the bots latency & uptime") async def ping(self, ctx): diff --git a/emojis.py b/emojis.py index 6c3210fc..186b4b06 100644 --- a/emojis.py +++ b/emojis.py @@ -17,4 +17,9 @@ replytop = "<:replytop:1207366581735129118>" replymiddle = "<:replymiddle:1207366662916014100> " -replybottom = "<:replybottom:1207366623913316363>" \ No newline at end of file +replybottom = "<:replybottom:1207366623913316363>" +smallarrow = "<:SmallArrow:1140288951861649418>" +arrow = "<:arrow:1166529434493386823>" +star = "<:Star:1133346299668873216>" +crisis = "<:Crisis:1190412318648062113>" +loa = "<:LOA:1164969910238203995>" \ No newline at end of file