diff --git a/cogs/inquiry.py b/cogs/inquiry.py index 3cd9ee0..dc4b0e5 100644 --- a/cogs/inquiry.py +++ b/cogs/inquiry.py @@ -5,6 +5,7 @@ from nextcord.ext import commands import nextcord from os import getenv +from .utils.colors import EMBED_COLOR, SUCCESS, INQUIRY, REPLY load_dotenv() @@ -18,11 +19,6 @@ AD_CHANNEL = int(getenv("AD_CHANNEL")) -EMBED_COLOR = 0xFF88FF -EMBED_SUCCESS = 0x2ECC71 -AD_EMBED_COLOR = 0x2ECC71 - - def get_date() -> str: return datetime.now().strftime("%m/%d/%Y") @@ -123,7 +119,7 @@ async def callback(self, inter: nextcord.Interaction) -> None: ) # inquiry again emb = nextcord.Embed() - emb.color = 0xC33C3C + emb.color = INQUIRY emb.set_author(name=f"{name} inquired:", icon_url=person.avatar) emb.description = self.message emb.set_footer(text=f"{id} • {get_date()} • {get_time()}") @@ -133,7 +129,7 @@ async def callback(self, inter: nextcord.Interaction) -> None: # response msg em = nextcord.Embed() - em.color = 0x398A9E + em.color = REPLY em.set_author( name=f"{inter.user.name} replied:", icon_url=inter.user.avatar ) @@ -173,7 +169,7 @@ async def accept(self, btn: nextcord.ui.Button, inter: nextcord.Interaction): f"Ticket created: <#{new_channel.id}>", ephemeral=True ) em = nextcord.Embed() - em.color = 0xC33C3C + em.color = INQUIRY em.set_author(name=f"{name} inquired:", icon_url=person.avatar) em.description = content em.set_footer(text=f"{id} • {get_date()} • {get_time()}") @@ -208,7 +204,7 @@ async def paid(self, btn: nextcord.ui.Button, inter: nextcord.Interaction): category = nextcord.utils.get(inter.guild.categories, id=PAID_CATEGORY) await inter.channel.edit(category=category) em = nextcord.Embed() - em.color = EMBED_SUCCESS + em.color = SUCCESS em.title = ":checkmark: Payment Received" em.description = """Thank you for your purchase!\nIf you haven't already, please send your advertisement message and ensure if you are using any custom/nitro-accessed Emojis that they are present within the Discord you are advertising (emojis from our server are fine, too).\n\nIf another advertisement was recently posted, out of courtesy it will be given a reasonable amount of uptime before yours is posted.""" em.set_footer(text=f"{inter.user.id} • {get_date()} • {get_time()}") diff --git a/cogs/ticket.py b/cogs/ticket.py index 96e3f1b..8617958 100644 --- a/cogs/ticket.py +++ b/cogs/ticket.py @@ -1,7 +1,8 @@ from os import getenv -from nextcord import SlashOption, TextChannel, slash_command +from nextcord import slash_command from nextcord.ext.commands import Bot, Cog import nextcord +from .utils.colors import CLOSE_REQUEST CLOSED_CATEGORY = int(getenv("CLOSED_CATEGORY")) @@ -62,7 +63,7 @@ async def close_request(self, inter: nextcord.Interaction): return em = nextcord.Embed() - em.color = 0x3498DB + em.color = CLOSE_REQUEST em.title = "Ticket Close Request" em.description = f"<@{inter.user.id}> has requested to close this ticket.\n\nPlease accept or deny this request using the buttons below." diff --git a/cogs/utils/colors.py b/cogs/utils/colors.py new file mode 100644 index 0000000..ab7fee3 --- /dev/null +++ b/cogs/utils/colors.py @@ -0,0 +1,5 @@ +EMBED_COLOR = 0xFF88FF +SUCCESS = 0x2ECC71 +INQUIRY = 0xC33C3C +REPLY = 0x398A9E +CLOSE_REQUEST = 0x3498DB