@@ -357,13 +357,16 @@ async def delete(self, ctx: GuildContext) -> None:
357
357
@commands .guild_only ()
358
358
@config .group (name = "prefix" , fallback = "info" )
359
359
async def prefix (self , ctx : GuildContext ) -> None :
360
- """Manages custom prefixes for the guild.
360
+ """Shows and manages custom prefixes for the guild
361
361
362
362
Passing in no subcommands will effectively show the currently set prefixes.
363
363
"""
364
364
prefixes = await get_prefix (self .bot , ctx .message )
365
365
embed = Embed ()
366
- embed .add_field (name = "Prefixes" , value = self .clean_prefixes (prefixes ))
366
+ embed .add_field (
367
+ name = "Prefixes" , value = self .clean_prefixes (prefixes ), inline = False
368
+ )
369
+ embed .add_field (name = "Total" , value = len (prefixes ) - 2 , inline = False )
367
370
embed .set_author (name = ctx .guild .name , icon_url = ctx .guild .icon .url ) # type: ignore
368
371
await ctx .send (embed = embed )
369
372
@@ -374,15 +377,15 @@ async def prefix_add(
374
377
) -> None :
375
378
"""Adds an custom prefix"""
376
379
prefixes = await get_prefix (self .bot , ctx .message )
377
- if isinstance (prefixes , list ) and len (prefixes ) > 12 or prefix in prefixes :
378
- desc = (
379
- "There was a validation issue. "
380
- "This is caused by these reasons: \n "
381
- "- You have more than 12 prefixes for your server\n "
382
- "- Your prefix fails the validation rules\n "
383
- "- The prefix you want to set already exists"
380
+
381
+ # 2 are the mention prefixes, which are always prepended on the list of prefixes
382
+ if isinstance (prefixes , list ) and len (prefixes ) > 12 :
383
+ await ctx .send (
384
+ "You can not have more than 10 custom prefixes for your server"
384
385
)
385
- await ctx .send (desc )
386
+ return
387
+ elif prefix in prefixes :
388
+ await ctx .send ("The prefix you want to set already exists" )
386
389
return
387
390
388
391
query = """
0 commit comments