Skip to content

Commit

Permalink
Better design stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsbirb committed Mar 6, 2024
1 parent 10a99ed commit cb419d3
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 58 deletions.
6 changes: 3 additions & 3 deletions Cogs/Configuration/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Cogs/Configuration/Views/CustomCommandsView.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Cogs/Configuration/Views/loaview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions Cogs/Modules/adminpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
)

Expand Down Expand Up @@ -1003,26 +1003,26 @@ 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:** <t:{int(infraction_info['expiration'].timestamp())}:D>"
expiration = f"\n{arrow}>**Expiration:** <t:{int(infraction_info['expiration'].timestamp())}:D>"
if infraction_info["expiration"] < datetime.now():
expiration = f"\n<:arrow:1166529434493386823>**Expiration:** <t:{int(infraction_info['expiration'].timestamp())}:D> **(Infraction Expired)**"
expiration = f"\n{arrow}>**Expiration:** <t:{int(infraction_info['expiration'].timestamp())}:D> **(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,
)

view = RevokeInfraction(self.user, interaction.guild, self.author)
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:
Expand Down Expand Up @@ -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><t:{int(start_time.timestamp())}:f> - <t:{int(end_time.timestamp())}:f> • {reason}"
f"{loa} **Previous LOA**\n{arrow}><t:{int(start_time.timestamp())}:f> - <t:{int(end_time.timestamp())}:f> • {reason}"
)

embed = discord.Embed(
Expand All @@ -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:** <t:{int(start_time.timestamp())}:f>\n<:arrow:1166529434493386823>**End Date:** <t:{int(end_time.timestamp())}:f>\n<:arrow:1166529434493386823>**Reason:** {reason}",
description=f"{loa} **Active LOA**\n{arrow}>**Start Date:** <t:{int(start_time.timestamp())}:f>\n{arrow}>**End Date:** <t:{int(end_time.timestamp())}:f>\n{arrow}>**Reason:** {reason}",
)
embed.set_thumbnail(url=self.user.display_avatar)
embed.set_author(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions Cogs/Modules/astro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}>")



Expand Down
2 changes: 1 addition & 1 deletion Cogs/Modules/datamanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>"), #
Expand Down
2 changes: 1 addition & 1 deletion Cogs/Modules/forumutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions Cogs/Modules/infractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:** <t:{int(infraction['expiration'].timestamp())}:D>"
expiration = f"\n{arrow}>**Expiration:** <t:{int(infraction['expiration'].timestamp())}:D>"
if infraction['expiration'] < datetime.now():
expiration = f"\n<:arrow:1166529434493386823>**Expiration:** <t:{int(infraction['expiration'].timestamp())}:D> **(Infraction Expired)**"
expiration = f"\n{arrow}>**Expiration:** <t:{int(infraction['expiration'].timestamp())}:D> **(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
)

Expand Down
Loading

0 comments on commit cb419d3

Please sign in to comment.