removed error when invalid plugin. It was called even when a typo was made

This commit is contained in:
2023-08-15 16:42:13 +03:00
parent 6315d13d18
commit e929646e8e

View File

@@ -124,10 +124,9 @@ internal class CommandHandler
.Substring(botPrefix.Length))));
cleanMessage = message.Content.Substring(botPrefix.Length);
}
if (plugin is null)
throw new Exception("Failed to run command ! " + message.CleanContent + " (user: " +
context.Message.Author.Username + " - " + context.Message.Author.Id + ")");
return;
if (plugin.requireAdmin && !context.Message.Author.isAdmin())
return;