Throwing error if the prefix specified is greater than 5 characters

pull/8/head
sgoudham 4 years ago
parent dd2100b7e3
commit e7c62fd3a8

@ -115,6 +115,10 @@ async def change_prefix(ctx, new: Optional[str]):
# 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)
# Making sure that errors are handled if prefix is above 5 characters
elif new and len(new) > 5:
await ctx.send("The guild prefix must be less than **5** characters!")
# if no prefix was provided # if no prefix was provided
elif not new: elif not new:
# Grab the current prefix for the guild within the cached dictionary # Grab the current prefix for the guild within the cached dictionary

Loading…
Cancel
Save