Update EventBot/Misc/EventRoleTypeReader.cs

Co-Authored-By: Karolis <Karolis2011@users.noreply.github.com>
This commit is contained in:
Geeves
2019-06-19 17:13:29 +02:00
committed by GitHub
parent e07853a8dd
commit e3d69dd9c5

View File

@@ -20,7 +20,7 @@ namespace EventBot.Misc
if (int.TryParse(input, out int id)) if (int.TryParse(input, out int id))
er = database.EventRoles.FirstOrDefault(r => r.Id == id); er = database.EventRoles.FirstOrDefault(r => r.Id == id);
else else
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Event role IS is not a valid number.")); return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Event role ID is not a valid number."));
if(er == null) if(er == null)
return Task.FromResult(TypeReaderResult.FromError(CommandError.ObjectNotFound, "Specified event role was not found.")); return Task.FromResult(TypeReaderResult.FromError(CommandError.ObjectNotFound, "Specified event role was not found."));
if(er.Event?.GuildId != context.Guild.Id) if(er.Event?.GuildId != context.Guild.Id)