From 88ed05127b42eec908663f4dcf7814f56d8fbd2e Mon Sep 17 00:00:00 2001 From: appelemac Date: Sat, 26 Mar 2016 21:03:44 +0100 Subject: [PATCH] Settype bugfixing --- NadekoBot/Modules/Pokegame/Pokegame.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NadekoBot/Modules/Pokegame/Pokegame.cs b/NadekoBot/Modules/Pokegame/Pokegame.cs index cd5b2ceb..8bda3a9e 100644 --- a/NadekoBot/Modules/Pokegame/Pokegame.cs +++ b/NadekoBot/Modules/Pokegame/Pokegame.cs @@ -338,7 +338,14 @@ namespace NadekoBot.Modules.pokegame if (targetType == null) { await e.Channel.SendMessage("Invalid type specified. Type must be one of:\nNORMAL, FIRE, WATER, ELECTRIC, GRASS, ICE, FIGHTING, POISON, GROUND, FLYING, PSYCHIC, BUG, ROCK, GHOST, DRAGON, DARK, STEEL"); + return; } + if (targetType == getPokeType(e.User.Id)) + { + await e.Channel.SendMessage($"Your type is already {targetType.getName().ToLowerInvariant()}{targetType.getImage()}"); + return; + } + //Payment~ var amount = 1; var pts = Classes.DbHandler.Instance.GetStateByUserId((long)e.User.Id)?.Value ?? 0;