Skip to content

Commit

Permalink
some linter stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Selyss committed Dec 17, 2023
1 parent a4767d3 commit 71fb39a
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions cogs/inquiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import nextcord
from os import getenv
from .utils.colors import EMBED_COLOR, SUCCESS, INQUIRY, REPLY
from .utils.formatting import get_date, get_time, format_footer
from .utils.formatting import format_footer

load_dotenv()

Expand Down Expand Up @@ -68,14 +68,15 @@ def __init__(self) -> None:
custom_id="closeview:close",
)
async def close(self, btn: nextcord.ui.Button, inter: nextcord.Interaction):
await inter.channel.send("Closing ticket...")
category = inter.guild.get_channel(CLOSED_CATEGORY)
await inter.channel.edit(category=category)
# TODO: remove person from ticket
if isinstance(inter.channel, nextcord.TextChannel):
await inter.channel.send("Closing ticket...")
category = inter.guild.get_channel(CLOSED_CATEGORY)
await inter.channel.edit(category=category)
# TODO: remove person from ticket


class QuickResponse(nextcord.ui.Modal):
def __init__(self, person: int, message: str) -> None:
def __init__(self, person, message) -> None:
super().__init__(
title="Quick Response",
custom_id="ticket:quickresponse",
Expand Down Expand Up @@ -192,14 +193,15 @@ def __init__(self) -> None:
label="Mark Paid", style=nextcord.ButtonStyle.green, custom_id="ticket:paid"
)
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 = 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=format_footer(inter.user.id))
await inter.response.send_message(embed=em)
if isinstance(inter.channel, nextcord.TextChannel):
category = nextcord.utils.get(inter.guild.categories, id=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.set_footer(text=format_footer(inter.user.id))
await inter.response.send_message(embed=em)


class AdForm(nextcord.ui.Modal):
Expand Down

0 comments on commit 71fb39a

Please sign in to comment.