Skip to content

Commit

Permalink
auto: format python code
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 2, 2024
1 parent 382fa00 commit 28b2d12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ async def _appeal_deny(
else:
if punsDB.count_documents({'user': user.id, 'type': 'appealdeny'}) < 2:
# User has not met the minimum appeal denials to be permanently denied
return await interaction.response.send_message(':x: To permanently deny a ban appeal, the user must have been denied at least 2 times previously')
return await interaction.response.send_message(
':x: To permanently deny a ban appeal, the user must have been denied at least 2 times previously'
)

humanizedTimestamp = 'permanently'
durationUserStr = f'You are not eligible to submit any further appeals for your ban; this decision is final. Please note, it is a [violation of the Discord Community Guidelines](https://discord.com/guidelines/) to use another account to evade this ban and doing so may result in Discord taking action against your account(s), including account termination.'
Expand Down
14 changes: 7 additions & 7 deletions cogs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ async def _can_appeal(member):
try:
if pun['expiry'] == None:
await member.send(
f'You have been automatically kicked from the /r/NintendoSwitch ban appeal server because you cannot make a new appeal. \n\nReason given by moderators:\n```{pun["reason"]}```'
)
f'You have been automatically kicked from the /r/NintendoSwitch ban appeal server because you cannot make a new appeal. \n\nReason given by moderators:\n```{pun["reason"]}```'
)

elif pun['expiry'] > datetime.now(tz=timezone.utc).timestamp():
expiry = datetime.fromtimestamp(pun['expiry'], tz=timezone.utc)
await member.send(
f'You have been automatically kicked from the /r/NintendoSwitch ban appeal server because you cannot make a new appeal yet. You can join back after __<t:{int(expiry.timestamp())}:f> (approximately <t:{int(expiry.timestamp())}:R>)__ to submit a new appeal with the following invite link: {config.appealInvite}\n\nReason given by moderators:\n```{pun["reason"]}```'
)
expiry = datetime.fromtimestamp(pun['expiry'], tz=timezone.utc)
await member.send(
f'You have been automatically kicked from the /r/NintendoSwitch ban appeal server because you cannot make a new appeal yet. You can join back after __<t:{int(expiry.timestamp())}:f> (approximately <t:{int(expiry.timestamp())}:R>)__ to submit a new appeal with the following invite link: {config.appealInvite}\n\nReason given by moderators:\n```{pun["reason"]}```'
)

finally:
if pun['expiry'] > datetime.now(tz=timezone.utc).timestamp():
Expand Down

0 comments on commit 28b2d12

Please sign in to comment.