@@ -50,7 +50,9 @@ async def setup(self, ctx):
5050
5151 if self .bot .modmail_guild is None :
5252 embed = discord .Embed (
53- title = "Error" , description = "Modmail functioning guild not found." , color = self .bot .error_color ,
53+ title = "Error" ,
54+ description = "Modmail functioning guild not found." ,
55+ color = self .bot .error_color ,
5456 )
5557 return await ctx .send (embed = embed )
5658
@@ -182,7 +184,9 @@ async def snippet_raw(self, ctx, *, name: str.lower):
182184 else :
183185 val = truncate (escape_code_block (val ), 2048 - 7 )
184186 embed = discord .Embed (
185- title = f'Raw snippet - "{ name } ":' , description = f"```\n { val } ```" , color = self .bot .main_color ,
187+ title = f'Raw snippet - "{ name } ":' ,
188+ description = f"```\n { val } ```" ,
189+ color = self .bot .main_color ,
186190 )
187191
188192 return await ctx .send (embed = embed )
@@ -204,7 +208,9 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte
204208 """
205209 if name in self .bot .snippets :
206210 embed = discord .Embed (
207- title = "Error" , color = self .bot .error_color , description = f"Snippet `{ name } ` already exists." ,
211+ title = "Error" ,
212+ color = self .bot .error_color ,
213+ description = f"Snippet `{ name } ` already exists." ,
208214 )
209215 return await ctx .send (embed = embed )
210216
@@ -228,7 +234,9 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte
228234 await self .bot .config .update ()
229235
230236 embed = discord .Embed (
231- title = "Added snippet" , color = self .bot .main_color , description = "Successfully created snippet." ,
237+ title = "Added snippet" ,
238+ color = self .bot .main_color ,
239+ description = "Successfully created snippet." ,
232240 )
233241 return await ctx .send (embed = embed )
234242
@@ -445,7 +453,8 @@ async def notify(self, ctx, *, user_or_role: Union[discord.Role, User, str.lower
445453
446454 if mention in mentions :
447455 embed = discord .Embed (
448- color = self .bot .error_color , description = f"{ mention } is already going to be mentioned." ,
456+ color = self .bot .error_color ,
457+ description = f"{ mention } is already going to be mentioned." ,
449458 )
450459 else :
451460 mentions .append (mention )
@@ -480,7 +489,8 @@ async def unnotify(self, ctx, *, user_or_role: Union[discord.Role, User, str.low
480489
481490 if mention not in mentions :
482491 embed = discord .Embed (
483- color = self .bot .error_color , description = f"{ mention } does not have a pending notification." ,
492+ color = self .bot .error_color ,
493+ description = f"{ mention } does not have a pending notification." ,
484494 )
485495 else :
486496 mentions .remove (mention )
@@ -516,7 +526,8 @@ async def subscribe(self, ctx, *, user_or_role: Union[discord.Role, User, str.lo
516526
517527 if mention in mentions :
518528 embed = discord .Embed (
519- color = self .bot .error_color , description = f"{ mention } is already subscribed to this thread." ,
529+ color = self .bot .error_color ,
530+ description = f"{ mention } is already subscribed to this thread." ,
520531 )
521532 else :
522533 mentions .append (mention )
@@ -551,13 +562,15 @@ async def unsubscribe(self, ctx, *, user_or_role: Union[discord.Role, User, str.
551562
552563 if mention not in mentions :
553564 embed = discord .Embed (
554- color = self .bot .error_color , description = f"{ mention } is not subscribed to this thread." ,
565+ color = self .bot .error_color ,
566+ description = f"{ mention } is not subscribed to this thread." ,
555567 )
556568 else :
557569 mentions .remove (mention )
558570 await self .bot .config .update ()
559571 embed = discord .Embed (
560- color = self .bot .main_color , description = f"{ mention } is now unsubscribed from this thread." ,
572+ color = self .bot .main_color ,
573+ description = f"{ mention } is now unsubscribed from this thread." ,
561574 )
562575 return await ctx .send (embed = embed )
563576
@@ -684,7 +697,8 @@ async def logs(self, ctx, *, user: User = None):
684697
685698 if not any (not log ["open" ] for log in logs ):
686699 embed = discord .Embed (
687- color = self .bot .error_color , description = "This user does not have any previous logs." ,
700+ color = self .bot .error_color ,
701+ description = "This user does not have any previous logs." ,
688702 )
689703 return await ctx .send (embed = embed )
690704
@@ -711,7 +725,8 @@ async def logs_closed_by(self, ctx, *, user: User = None):
711725
712726 if not embeds :
713727 embed = discord .Embed (
714- color = self .bot .error_color , description = "No log entries have been found for that query." ,
728+ color = self .bot .error_color ,
729+ description = "No log entries have been found for that query." ,
715730 )
716731 return await ctx .send (embed = embed )
717732
@@ -730,7 +745,9 @@ async def logs_delete(self, ctx, key_or_link: str):
730745
731746 if not success :
732747 embed = discord .Embed (
733- title = "Error" , description = f"Log entry `{ key } ` not found." , color = self .bot .error_color ,
748+ title = "Error" ,
749+ description = f"Log entry `{ key } ` not found." ,
750+ color = self .bot .error_color ,
734751 )
735752 else :
736753 embed = discord .Embed (
@@ -783,7 +800,8 @@ async def logs_search(self, ctx, limit: Optional[int] = None, *, query):
783800
784801 if not embeds :
785802 embed = discord .Embed (
786- color = self .bot .error_color , description = "No log entries have been found for that query." ,
803+ color = self .bot .error_color ,
804+ description = "No log entries have been found for that query." ,
787805 )
788806 return await ctx .send (embed = embed )
789807
@@ -994,7 +1012,10 @@ async def contact(
9941012
9951013 else :
9961014 thread = await self .bot .threads .create (
997- recipient = user , creator = ctx .author , category = category , manual_trigger = manual_trigger ,
1015+ recipient = user ,
1016+ creator = ctx .author ,
1017+ category = category ,
1018+ manual_trigger = manual_trigger ,
9981019 )
9991020 if thread .cancelled :
10001021 return
@@ -1008,7 +1029,11 @@ async def contact(
10081029 else :
10091030 description = f"{ ctx .author .name } has opened a Modmail thread."
10101031
1011- em = discord .Embed (title = "New Thread" , description = description , color = self .bot .main_color ,)
1032+ em = discord .Embed (
1033+ title = "New Thread" ,
1034+ description = description ,
1035+ color = self .bot .main_color ,
1036+ )
10121037 if self .bot .config ["show_timestamp" ]:
10131038 em .timestamp = datetime .utcnow ()
10141039 em .set_footer (icon_url = ctx .author .avatar_url )
@@ -1050,7 +1075,8 @@ async def blocked(self, ctx):
10501075 end_time = re .search (r"%([^%]+?)%" , reason )
10511076 if end_time is not None :
10521077 logger .warning (
1053- r"Deprecated time message for user %s, block and unblock again to update." , id_ ,
1078+ r"Deprecated time message for user %s, block and unblock again to update." ,
1079+ id_ ,
10541080 )
10551081
10561082 if end_time is not None :
@@ -1081,7 +1107,8 @@ async def blocked(self, ctx):
10811107 end_time = re .search (r"%([^%]+?)%" , reason )
10821108 if end_time is not None :
10831109 logger .warning (
1084- r"Deprecated time message for role %s, block and unblock again to update." , id_ ,
1110+ r"Deprecated time message for role %s, block and unblock again to update." ,
1111+ id_ ,
10851112 )
10861113
10871114 if end_time is not None :
@@ -1103,7 +1130,9 @@ async def blocked(self, ctx):
11031130 line = mention + f" - { reason or 'No Reason Provided' } \n "
11041131 if len (embed .description ) + len (line ) > 2048 :
11051132 embed = discord .Embed (
1106- title = "Blocked Users (Continued)" , color = self .bot .main_color , description = line ,
1133+ title = "Blocked Users (Continued)" ,
1134+ color = self .bot .main_color ,
1135+ description = line ,
11071136 )
11081137 embeds .append (embed )
11091138 else :
@@ -1120,7 +1149,9 @@ async def blocked(self, ctx):
11201149 line = mention + f" - { reason or 'No Reason Provided' } \n "
11211150 if len (embed .description ) + len (line ) > 2048 :
11221151 embed = discord .Embed (
1123- title = "Blocked Roles (Continued)" , color = self .bot .main_color , description = line ,
1152+ title = "Blocked Roles (Continued)" ,
1153+ color = self .bot .main_color ,
1154+ description = line ,
11241155 )
11251156 embeds .append (embed )
11261157 else :
@@ -1180,7 +1211,9 @@ async def blocked_whitelist(self, ctx, *, user: User = None):
11801211 )
11811212 else :
11821213 embed = discord .Embed (
1183- title = "Success" , color = self .bot .main_color , description = f"{ mention } is now whitelisted." ,
1214+ title = "Success" ,
1215+ color = self .bot .main_color ,
1216+ description = f"{ mention } is now whitelisted." ,
11841217 )
11851218
11861219 return await ctx .send (embed = embed )
@@ -1258,7 +1291,9 @@ async def block(
12581291 )
12591292 else :
12601293 embed = discord .Embed (
1261- title = "Success" , color = self .bot .main_color , description = f"{ mention } is now blocked { reason } " ,
1294+ title = "Success" ,
1295+ color = self .bot .main_color ,
1296+ description = f"{ mention } is now blocked { reason } " ,
12621297 )
12631298
12641299 if isinstance (user_or_role , discord .Role ):
@@ -1321,7 +1356,9 @@ async def unblock(self, ctx, *, user_or_role: Union[User, Role] = None):
13211356 await self .bot .config .update ()
13221357
13231358 embed = discord .Embed (
1324- title = "Success" , color = self .bot .main_color , description = f"{ mention } is no longer blocked." ,
1359+ title = "Success" ,
1360+ color = self .bot .main_color ,
1361+ description = f"{ mention } is no longer blocked." ,
13251362 )
13261363 else :
13271364 embed = discord .Embed (
@@ -1378,7 +1415,8 @@ async def repair(self, ctx):
13781415
13791416 # Search cache for channel
13801417 user_id , thread = next (
1381- ((k , v ) for k , v in self .bot .threads .cache .items () if v .channel == ctx .channel ), (- 1 , None ),
1418+ ((k , v ) for k , v in self .bot .threads .cache .items () if v .channel == ctx .channel ),
1419+ (- 1 , None ),
13821420 )
13831421 if thread is not None :
13841422 logger .debug ("Found thread with tempered ID." )
0 commit comments