Skip to content

Conversation

@kasualkid12
Copy link
Contributor

Sends a ping to mods in a new channel when a ban appeal form is submitted through the website, added new optional ENV variable for new ban appeal forms channel and new constant for mod role ID. Closes: #360

Sends a ping to mods in a new channel when a ban appeal form is submitted through the website, added new optional ENV variable for new ban appeal forms channel and new constant for mod role ID.
Closes: #360
@kasualkid12 kasualkid12 requested a review from a team October 16, 2025 01:45
@KingManatea
Copy link
Contributor

also closes #398

Comment on lines +77 to +104
body = {
"content": f"<@&{RoleIDs.MOD}> ",
"allowed_mentions": {"parse": ["roles"]},
"embeds": [
{
"title": "Ban Appeal Submitted",
"description": (
f"Ban appeal form submitted by <@{request.user_id}> "
f"(form ID: {result})."
),
"fields": [
{
# TODO: Add character limiting; fails to send on more than 1024 characters
"name": "Reason",
"value": request.reason,
"inline": False,
},
{
"name": "Submission",
"value": f"To view request details, please refer to the [mod portal](https://naurffxiv.com/mod-portal/unban-appeals/).", # add {result} to end of link when forms are functioning to link directly to requested form
"inline": False,
},
],
"footer": {"text": f"ID: {request.user_id}"},
"timestamp": datetime.now(timezone.utc).isoformat(),
}
],
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like this body is too big to be in this function. and honestly i think we can probably benefit a lot if we make this into a class since i would expect we would making a lot more api calls later... although now that i'm thinking about it more, discord.py should be able to send all of this data without doing all of headers and body stuff (see how we make the logging embed)

@brtran4 brtran4 linked an issue Oct 16, 2025 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ping mods on discord when a ban appeal form is submitted

4 participants