diff --git a/.env.example b/.env.example index de79fb1..90d7566 100644 --- a/.env.example +++ b/.env.example @@ -7,4 +7,4 @@ REQUEST_CHANNEL= ADVERTISING_ROLE= AD_CHANNEL= -AD_CATEGORY +AD_CATEGORY= diff --git a/.gitignore b/.gitignore index de4535e..e16fdb1 100644 --- a/.gitignore +++ b/.gitignore @@ -160,7 +160,7 @@ cython_debug/ #.idea/ -marlow-bot/ +contact-request-bot config.json diff --git a/README.md b/README.md index 5e039c6..c6000ac 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# marlow-dm-bot \ No newline at end of file +# contact-request-bot diff --git a/cogs/inquiry.py b/cogs/inquiry.py index ccc7bd5..e2a01a5 100644 --- a/cogs/inquiry.py +++ b/cogs/inquiry.py @@ -18,6 +18,9 @@ REQUEST_CHANNEL = int(getenv("REQUEST_CHANNEL")) ADVERTISING_ROLE = int(getenv("ADVERTISING_ROLE")) AD_CHANNEL = int(getenv("AD_CHANNEL")) +DEPLOY_DESC = getenv("DEPLOY_DESC") +FORM_TITLE = getenv("FORM_TITLE") +PAYMENT_DESC = getenv("PAYMENT_DESC") class TicketView(nextcord.ui.View): @@ -183,7 +186,7 @@ async def accept(self, btn: nextcord.ui.Button, inter: nextcord.Interaction): emb = nextcord.Embed() emb.color = AD_EM_COLOR 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*""" + emb.description = PAYMENT_DESC await new_channel.send(embed=emb) else: @@ -257,7 +260,7 @@ async def callback(self, inter: nextcord.Interaction) -> None: class QuestionForm(nextcord.ui.Modal): def __init__(self): super().__init__( - title="Contact Marlow", + title=FORM_TITLE, custom_id="questionform:question", timeout=None, ) @@ -311,12 +314,7 @@ async def deploy(self, inter: nextcord.Interaction) -> None: if isinstance(inter.channel, nextcord.TextChannel): em = nextcord.Embed( title="📫 Contact Request", - description=""" - Due to an influx of messages, I have decided to use requests to filter spam while still providing a means for important inquiries to be made. - - I cannot guarantee a response to each inquiry. - Please reserve this system for important reasons. - """, + description=DEPLOY_DESC, color=EMBED_COLOR, ) diff --git a/views/ad.py b/views/ad.py index 14d03f6..951f796 100644 --- a/views/ad.py +++ b/views/ad.py @@ -1,5 +1,12 @@ import nextcord from cogs.utils.colors import SUCCESS +from os import getenv +from dotenv.main import load_dotenv + +load_dotenv() + +AD_PAID_DESC = getenv("AD_PAID_DESC") +AD_PAID_TITLE = getenv("AD_PAID_TITLE") class AdView(nextcord.ui.View): @@ -13,12 +20,16 @@ def __init__(self, paid_category=None, advertising_role=None) -> None: ) async def paid(self, btn: nextcord.ui.Button, inter: nextcord.Interaction) -> None: if isinstance(inter.channel, nextcord.TextChannel): - print(self.advertising_role) - if inter.permissions.administrator or (nextcord.utils.get(inter.guild.roles, id=self.advertising_role) in inter.roles): - category = nextcord.utils.get(inter.guild.categories, id=self.paid_category) + if inter.permissions.administrator or ( + nextcord.utils.get(inter.guild.roles, id=self.advertising_role) + in inter.roles + ): + category = nextcord.utils.get( + inter.guild.categories, id=self.paid_category + ) await inter.channel.edit(category=category) em = nextcord.Embed() 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.title = AD_PAID_TITLE + em.description = AD_PAID_DESC await inter.response.send_message(embed=em)