Skip to content

Commit 53f930d

Browse files
committed
Black formatting
1 parent 08ab537 commit 53f930d

File tree

9 files changed

+156
-116
lines changed

9 files changed

+156
-116
lines changed

bot.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self):
7171
self._api = None
7272
self.metadata_loop = None
7373
self.formatter = SafeFormatter()
74-
self.loaded_cogs = ['cogs.modmail', 'cogs.plugins', 'cogs.utility']
74+
self.loaded_cogs = ["cogs.modmail", "cogs.plugins", "cogs.utility"]
7575

7676
self._connected = asyncio.Event()
7777
self.start_time = datetime.utcnow()
@@ -829,7 +829,7 @@ async def process_commands(self, message):
829829

830830
thread = await self.threads.find(channel=ctx.channel)
831831
if thread is not None:
832-
if self.config.get('reply_without_command'):
832+
if self.config.get("reply_without_command"):
833833
await thread.reply(message)
834834
else:
835835
await self.api.append_log(message, type_="internal")
@@ -857,7 +857,7 @@ async def _void(*_args, **_kwargs):
857857
if thread:
858858
await thread.channel.trigger_typing()
859859
else:
860-
if not self.config.get('mod_typing'):
860+
if not self.config.get("mod_typing"):
861861
return
862862

863863
thread = await self.threads.find(channel=channel)
@@ -895,7 +895,7 @@ async def on_raw_reaction_add(self, payload):
895895

896896
if isinstance(channel, discord.DMChannel):
897897
if str(reaction) == str(close_emoji): # closing thread
898-
if not self.config.get('recipient_thread_close'):
898+
if not self.config.get("recipient_thread_close"):
899899
return
900900
thread = await self.threads.find(recipient=user)
901901
ts = message.embeds[0].timestamp if message.embeds else None
@@ -953,8 +953,7 @@ async def on_member_remove(self, member):
953953
thread = await self.threads.find(recipient=member)
954954
if thread:
955955
embed = discord.Embed(
956-
description="The recipient has left the server.",
957-
color=self.error_color,
956+
description="The recipient has left the server.", color=self.error_color
958957
)
959958
await thread.channel.send(embed=embed)
960959

@@ -1018,9 +1017,7 @@ async def on_command_error(self, context, exception):
10181017
elif isinstance(exception, commands.BadArgument):
10191018
await context.trigger_typing()
10201019
await context.send(
1021-
embed=discord.Embed(
1022-
color=self.error_color, description=str(exception)
1023-
)
1020+
embed=discord.Embed(color=self.error_color, description=str(exception))
10241021
)
10251022
elif isinstance(exception, commands.CommandNotFound):
10261023
logger.warning("CommandNotFound: %s", exception)

cogs/modmail.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ async def snippet_edit(self, ctx, name: str.lower, *, value):
286286
@commands.command()
287287
@checks.has_permissions(PermissionLevel.MODERATOR)
288288
@checks.thread_only()
289-
async def move(self, ctx, category: discord.CategoryChannel, *, specifics: str = None):
289+
async def move(
290+
self, ctx, category: discord.CategoryChannel, *, specifics: str = None
291+
):
290292
"""
291293
Move a thread to another category.
292294
@@ -297,16 +299,16 @@ async def move(self, ctx, category: discord.CategoryChannel, *, specifics: str =
297299
silent = False
298300

299301
if specifics:
300-
silent_words = ['silent', 'silently']
302+
silent_words = ["silent", "silently"]
301303
silent = any(word in silent_words for word in specifics.split())
302304

303305
await thread.channel.edit(category=category, sync_permissions=True)
304306

305-
if self.bot.config('thread_move_notify') and not silent:
307+
if self.bot.config("thread_move_notify") and not silent:
306308
embed = discord.Embed(
307309
title="Thread Moved",
308310
description=self.bot.config["thread_move_response"],
309-
color=self.bot.main_color
311+
color=self.bot.main_color,
310312
)
311313
await thread.recipient.send(embed=embed)
312314

0 commit comments

Comments
 (0)