Skip to content

Commit

Permalink
segment colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Selyss committed Dec 17, 2023
1 parent a703866 commit 977e19d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 5 additions & 9 deletions cogs/inquiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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")

Expand Down Expand Up @@ -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()}")
Expand All @@ -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
)
Expand Down Expand Up @@ -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()}")
Expand Down Expand Up @@ -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()}")
Expand Down
5 changes: 3 additions & 2 deletions cogs/ticket.py
Original file line number Diff line number Diff line change
@@ -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"))

Expand Down Expand Up @@ -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."

Expand Down
5 changes: 5 additions & 0 deletions cogs/utils/colors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
EMBED_COLOR = 0xFF88FF
SUCCESS = 0x2ECC71
INQUIRY = 0xC33C3C
REPLY = 0x398A9E
CLOSE_REQUEST = 0x3498DB

0 comments on commit 977e19d

Please sign in to comment.