I guess whitespaces are ok too

This commit is contained in:
13xforever 2020-09-29 20:20:01 +05:00
parent d199d3534d
commit 264ea9bb31

View File

@ -27,11 +27,11 @@ namespace CompatBot.Commands
{
if (expectedNickname.Length < 2 || expectedNickname.Length > 32)
{
await ctx.ReactWithAsync( Config.Reactions.Failure, "Nickname must be between 2 and 32 characters long", true).ConfigureAwait(false);
await ctx.ReactWithAsync(Config.Reactions.Failure, "Nickname must be between 2 and 32 characters long", true).ConfigureAwait(false);
return;
}
if (!expectedNickname.All(char.IsLetterOrDigit))
if (!expectedNickname.All(c => char.IsLetterOrDigit(c) || char.IsWhiteSpace(c)))
{
await ctx.ReactWithAsync(Config.Reactions.Failure, "Nickname must follow Rule 7", true).ConfigureAwait(false);
return;