@@ -50,7 +50,9 @@ async def setup(self, ctx):
50
50
51
51
if self .bot .modmail_guild is None :
52
52
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 ,
54
56
)
55
57
return await ctx .send (embed = embed )
56
58
@@ -182,7 +184,9 @@ async def snippet_raw(self, ctx, *, name: str.lower):
182
184
else :
183
185
val = truncate (escape_code_block (val ), 2048 - 7 )
184
186
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 ,
186
190
)
187
191
188
192
return await ctx .send (embed = embed )
@@ -204,7 +208,9 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte
204
208
"""
205
209
if name in self .bot .snippets :
206
210
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." ,
208
214
)
209
215
return await ctx .send (embed = embed )
210
216
@@ -228,7 +234,9 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte
228
234
await self .bot .config .update ()
229
235
230
236
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." ,
232
240
)
233
241
return await ctx .send (embed = embed )
234
242
@@ -445,7 +453,8 @@ async def notify(self, ctx, *, user_or_role: Union[discord.Role, User, str.lower
445
453
446
454
if mention in mentions :
447
455
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." ,
449
458
)
450
459
else :
451
460
mentions .append (mention )
@@ -480,7 +489,8 @@ async def unnotify(self, ctx, *, user_or_role: Union[discord.Role, User, str.low
480
489
481
490
if mention not in mentions :
482
491
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." ,
484
494
)
485
495
else :
486
496
mentions .remove (mention )
@@ -516,7 +526,8 @@ async def subscribe(self, ctx, *, user_or_role: Union[discord.Role, User, str.lo
516
526
517
527
if mention in mentions :
518
528
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." ,
520
531
)
521
532
else :
522
533
mentions .append (mention )
@@ -551,13 +562,15 @@ async def unsubscribe(self, ctx, *, user_or_role: Union[discord.Role, User, str.
551
562
552
563
if mention not in mentions :
553
564
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." ,
555
567
)
556
568
else :
557
569
mentions .remove (mention )
558
570
await self .bot .config .update ()
559
571
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." ,
561
574
)
562
575
return await ctx .send (embed = embed )
563
576
@@ -684,7 +697,8 @@ async def logs(self, ctx, *, user: User = None):
684
697
685
698
if not any (not log ["open" ] for log in logs ):
686
699
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." ,
688
702
)
689
703
return await ctx .send (embed = embed )
690
704
@@ -711,7 +725,8 @@ async def logs_closed_by(self, ctx, *, user: User = None):
711
725
712
726
if not embeds :
713
727
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." ,
715
730
)
716
731
return await ctx .send (embed = embed )
717
732
@@ -730,7 +745,9 @@ async def logs_delete(self, ctx, key_or_link: str):
730
745
731
746
if not success :
732
747
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 ,
734
751
)
735
752
else :
736
753
embed = discord .Embed (
@@ -783,7 +800,8 @@ async def logs_search(self, ctx, limit: Optional[int] = None, *, query):
783
800
784
801
if not embeds :
785
802
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." ,
787
805
)
788
806
return await ctx .send (embed = embed )
789
807
@@ -994,7 +1012,10 @@ async def contact(
994
1012
995
1013
else :
996
1014
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 ,
998
1019
)
999
1020
if thread .cancelled :
1000
1021
return
@@ -1008,7 +1029,11 @@ async def contact(
1008
1029
else :
1009
1030
description = f"{ ctx .author .name } has opened a Modmail thread."
1010
1031
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
+ )
1012
1037
if self .bot .config ["show_timestamp" ]:
1013
1038
em .timestamp = datetime .utcnow ()
1014
1039
em .set_footer (icon_url = ctx .author .avatar_url )
@@ -1050,7 +1075,8 @@ async def blocked(self, ctx):
1050
1075
end_time = re .search (r"%([^%]+?)%" , reason )
1051
1076
if end_time is not None :
1052
1077
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_ ,
1054
1080
)
1055
1081
1056
1082
if end_time is not None :
@@ -1081,7 +1107,8 @@ async def blocked(self, ctx):
1081
1107
end_time = re .search (r"%([^%]+?)%" , reason )
1082
1108
if end_time is not None :
1083
1109
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_ ,
1085
1112
)
1086
1113
1087
1114
if end_time is not None :
@@ -1103,7 +1130,9 @@ async def blocked(self, ctx):
1103
1130
line = mention + f" - { reason or 'No Reason Provided' } \n "
1104
1131
if len (embed .description ) + len (line ) > 2048 :
1105
1132
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 ,
1107
1136
)
1108
1137
embeds .append (embed )
1109
1138
else :
@@ -1120,7 +1149,9 @@ async def blocked(self, ctx):
1120
1149
line = mention + f" - { reason or 'No Reason Provided' } \n "
1121
1150
if len (embed .description ) + len (line ) > 2048 :
1122
1151
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 ,
1124
1155
)
1125
1156
embeds .append (embed )
1126
1157
else :
@@ -1180,7 +1211,9 @@ async def blocked_whitelist(self, ctx, *, user: User = None):
1180
1211
)
1181
1212
else :
1182
1213
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." ,
1184
1217
)
1185
1218
1186
1219
return await ctx .send (embed = embed )
@@ -1258,7 +1291,9 @@ async def block(
1258
1291
)
1259
1292
else :
1260
1293
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 } " ,
1262
1297
)
1263
1298
1264
1299
if isinstance (user_or_role , discord .Role ):
@@ -1321,7 +1356,9 @@ async def unblock(self, ctx, *, user_or_role: Union[User, Role] = None):
1321
1356
await self .bot .config .update ()
1322
1357
1323
1358
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." ,
1325
1362
)
1326
1363
else :
1327
1364
embed = discord .Embed (
@@ -1378,7 +1415,8 @@ async def repair(self, ctx):
1378
1415
1379
1416
# Search cache for channel
1380
1417
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 ),
1382
1420
)
1383
1421
if thread is not None :
1384
1422
logger .debug ("Found thread with tempered ID." )
0 commit comments