Throwing error if the prefix specified is greater than 5 characters

Added space in prefix if it is greater than 1 character (Testing)
pull/8/head
sgoudham 4 years ago
parent e7c62fd3a8
commit 7de6032305

@ -111,7 +111,10 @@ async def _ping(ctx):
async def change_prefix(ctx, new: Optional[str]): async def change_prefix(ctx, new: Optional[str]):
# As long as a new prefix has been given and is less than 5 characters # As long as a new prefix has been given and is less than 5 characters
if new and len(new) < 5: if new and len(new) < 5:
if len(new) > 1:
spaced_prefix = f"{new} "
await storage_prefix_for_guild(ctx, new)
else:
# Store the new prefix in the dictionary and update the database # Store the new prefix in the dictionary and update the database
await storage_prefix_for_guild(ctx, new) await storage_prefix_for_guild(ctx, new)

Loading…
Cancel
Save