From e7c62fd3a8f54f98fdeaa70671d8482abe084105 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 20 Jul 2020 21:27:17 +0100 Subject: [PATCH] Throwing error if the prefix specified is greater than 5 characters --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index b1eaab53..11850b77 100644 --- a/main.py +++ b/main.py @@ -115,6 +115,10 @@ async def change_prefix(ctx, new: Optional[str]): # Store the new prefix in the dictionary and update the database 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 elif not new: # Grab the current prefix for the guild within the cached dictionary