From 28b2d1264219796918ad005b5f9801aa39633e22 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:21:33 +0000 Subject: [PATCH] auto: format python code --- cogs/modmail.py | 4 +++- cogs/utils.py | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cogs/modmail.py b/cogs/modmail.py index 8e90fa2..2743010 100644 --- a/cogs/modmail.py +++ b/cogs/modmail.py @@ -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.' diff --git a/cogs/utils.py b/cogs/utils.py index 2ad3173..c7fec6a 100644 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -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 __ (approximately )__ 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 __ (approximately )__ 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():