From 502e2934dae41a76e303edd3964c0aac9df85e7f Mon Sep 17 00:00:00 2001 From: Selyss <99344963+Selyss@users.noreply.github.com> Date: Sun, 17 Dec 2023 12:14:44 -0500 Subject: [PATCH] fix: ad didn't send ad content --- cogs/inquiry.py | 48 +++++++++++++++++++++++++++++++++----------- cogs/utils/colors.py | 1 + 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/cogs/inquiry.py b/cogs/inquiry.py index fe48055..0d96507 100644 --- a/cogs/inquiry.py +++ b/cogs/inquiry.py @@ -4,7 +4,7 @@ from nextcord.ext import commands import nextcord from os import getenv -from .utils.colors import EMBED_COLOR, SUCCESS, INQUIRY, REPLY +from .utils.colors import EMBED_COLOR, SUCCESS, INQUIRY, REPLY, AD_EM_COLOR from .utils.formatting import format_footer load_dotenv() @@ -161,18 +161,42 @@ async def accept(self, btn: nextcord.ui.Button, inter: nextcord.Interaction): f"Ticket created: <#{new_channel.id}>", ephemeral=True ) em = nextcord.Embed() - em.color = INQUIRY - em.set_author(name=f"{name} inquired:", icon_url=person.avatar) - em.description = content - em.set_footer(text=format_footer(id)) + if inter.channel.id == AD_CHANNEL: + # IS AD + em.color = SUCCESS + em.set_author( + name=f"{name} requested an advertisement:", icon_url=person.avatar + ) + em.description = content + em.set_footer(text=format_footer(id)) - await new_channel.set_permissions( - person, send_messages=True, read_messages=True - ) - await new_channel.send( - content=f"<@{id}>", - embed=em, - ) + await new_channel.set_permissions( + person, send_messages=True, read_messages=True + ) + await new_channel.send( + content=f"<@{inter.user.id}> <@{ADVERTISING_ROLE}>", + embed=em, + view=AdView(), + ) + emb = nextcord.Embed() + emb.color = 0xE67E22 + emb.title = "__**Advertisement Services**__" + emb.description = """:bell: $40 = Ping @ everyone with ad message/links\n\n:gift: $45 = Hosted Nitro Giveaway Ad with @ everyone ping (Nitro must be supplied by the customer)\n\n*These prices apply to the Vanilla PvP Community/Tier List*""" + await new_channel.send(embed=emb) + + else: + em.color = INQUIRY + em.set_author(name=f"{name} inquired:", icon_url=person.avatar) + em.description = content + em.set_footer(text=format_footer(id)) + + await new_channel.set_permissions( + person, send_messages=True, read_messages=True + ) + await new_channel.send( + content=f"<@{id}>", + embed=em, + ) @nextcord.ui.button( label="Quick Response", diff --git a/cogs/utils/colors.py b/cogs/utils/colors.py index 3813790..80490dc 100644 --- a/cogs/utils/colors.py +++ b/cogs/utils/colors.py @@ -3,3 +3,4 @@ INQUIRY = 0xC33C3C # red REPLY = 0x398A9E # blue CLOSE_REQUEST = 0x3498DB +AD_EM_COLOR = 0xE67E22