@@ -127,8 +127,12 @@ async def fetchwidget(self, ctx, *, server_id: int):
127
127
em .add_field (
128
128
name = _ ("Features" ),
129
129
value = "\n " .join (_ (GUILD_FEATURES .get (f , f )) for f in guild .features ).format (
130
- banner = guild .banner and f" [🔗]({ guild .banner_url_as (format = 'png' )} )" or "" ,
131
- splash = guild .splash and f" [🔗]({ guild .splash_url_as (format = 'png' )} )" or "" ,
130
+ banner = guild .banner
131
+ and f" [🔗]({ guild .banner_url_as (format = 'png' )} )"
132
+ or "" ,
133
+ splash = guild .splash
134
+ and f" [🔗]({ guild .splash_url_as (format = 'png' )} )"
135
+ or "" ,
132
136
discovery = getattr (guild , "discovery_splash" , None )
133
137
and f" [🔗]({ guild .discovery_splash_url_as (format = 'png' )} )"
134
138
or "" ,
@@ -263,35 +267,55 @@ async def sinfo(self, ctx, *, server: commands.GuildConverter = None):
263
267
)
264
268
em .add_field (
265
269
name = _ ("Verification level" ),
266
- value = _ ("None" )
267
- if server .verification_level == discord .VerificationLevel .none
268
- else _ ("Low" )
269
- if server .verification_level == discord .VerificationLevel .low
270
- else _ ("Medium" )
271
- if server .verification_level == discord .VerificationLevel .medium
272
- else _ ("High" )
273
- if server .verification_level == discord .VerificationLevel .high
274
- else _ ("Highest" )
275
- if server .verification_level == discord .VerificationLevel .extreme
276
- else _ ("Unknown" ),
270
+ value = (
271
+ _ ("None" )
272
+ if server .verification_level == discord .VerificationLevel .none
273
+ else (
274
+ _ ("Low" )
275
+ if server .verification_level == discord .VerificationLevel .low
276
+ else (
277
+ _ ("Medium" )
278
+ if server .verification_level == discord .VerificationLevel .medium
279
+ else (
280
+ _ ("High" )
281
+ if server .verification_level == discord .VerificationLevel .high
282
+ else (
283
+ _ ("Highest" )
284
+ if server .verification_level == discord .VerificationLevel .extreme
285
+ else _ ("Unknown" )
286
+ )
287
+ )
288
+ )
289
+ )
290
+ ),
277
291
)
278
292
em .add_field (
279
293
name = _ ("Explicit content filter" ),
280
- value = _ ("Don't scan any messages." )
281
- if server .explicit_content_filter == discord .ContentFilter .disabled
282
- else _ ("Scan messages from members without a role." )
283
- if server .explicit_content_filter == discord .ContentFilter .no_role
284
- else _ ("Scan messages sent by all members." )
285
- if server .explicit_content_filter == discord .ContentFilter .all_members
286
- else _ ("Unknown" ),
294
+ value = (
295
+ _ ("Don't scan any messages." )
296
+ if server .explicit_content_filter == discord .ContentFilter .disabled
297
+ else (
298
+ _ ("Scan messages from members without a role." )
299
+ if server .explicit_content_filter == discord .ContentFilter .no_role
300
+ else (
301
+ _ ("Scan messages sent by all members." )
302
+ if server .explicit_content_filter == discord .ContentFilter .all_members
303
+ else _ ("Unknown" )
304
+ )
305
+ )
306
+ ),
287
307
)
288
308
em .add_field (
289
309
name = _ ("Default notifications" ),
290
- value = _ ("All messages" )
291
- if server .default_notifications == discord .NotificationLevel .all_messages
292
- else _ ("Only @mentions" )
293
- if server .default_notifications == discord .NotificationLevel .only_mentions
294
- else _ ("Unknown" ),
310
+ value = (
311
+ _ ("All messages" )
312
+ if server .default_notifications == discord .NotificationLevel .all_messages
313
+ else (
314
+ _ ("Only @mentions" )
315
+ if server .default_notifications == discord .NotificationLevel .only_mentions
316
+ else _ ("Unknown" )
317
+ )
318
+ ),
295
319
)
296
320
em .add_field (name = _ ("2FA admins" ), value = bool_emojify (server .mfa_level ))
297
321
if server .rules_channel :
@@ -432,15 +456,19 @@ async def cinfo(
432
456
changed_roles = sorted (channel .changed_roles , key = lambda r : r .position , reverse = True )
433
457
em = discord .Embed (
434
458
title = chat .escape (str (channel .name ), formatting = True ),
435
- description = topic
436
- if (topic := getattr (channel , "topic" , None ))
437
- else "\N{SPEECH BALLOON} : {} | \N{SPEAKER} : {} | \N{SATELLITE ANTENNA} : {}" .format (
438
- len (channel .text_channels ),
439
- len (channel .voice_channels ),
440
- len (channel .stage_channels ),
441
- )
442
- if isinstance (channel , discord .CategoryChannel )
443
- else discord .Embed .Empty ,
459
+ description = (
460
+ topic
461
+ if (topic := getattr (channel , "topic" , None ))
462
+ else (
463
+ "\N{SPEECH BALLOON} : {} | \N{SPEAKER} : {} | \N{SATELLITE ANTENNA} : {}" .format (
464
+ len (channel .text_channels ),
465
+ len (channel .voice_channels ),
466
+ len (channel .stage_channels ),
467
+ )
468
+ if isinstance (channel , discord .CategoryChannel )
469
+ else discord .Embed .Empty
470
+ )
471
+ ),
444
472
color = await ctx .embed_color (),
445
473
)
446
474
em .add_field (name = _ ("ID" ), value = channel .id )
0 commit comments