minor cleanup

This commit is contained in:
Kwoth 2016-07-17 18:20:55 +02:00
parent 520902b626
commit 6e20c8d719
3 changed files with 5 additions and 6 deletions

View File

@ -53,7 +53,6 @@ namespace NadekoBot.Modules.Help
await e.Channel.SendMessage("That module does not exist.").ConfigureAwait(false); await e.Channel.SendMessage("That module does not exist.").ConfigureAwait(false);
return; return;
} }
var i = 0;
if (module != "customreactions" && module != "conversations") if (module != "customreactions" && module != "conversations")
{ {
await e.Channel.SendMessage("`List Of Commands:`\n" + SearchHelper.ShowInPrettyCode<Command>(cmdsArray, await e.Channel.SendMessage("`List Of Commands:`\n" + SearchHelper.ShowInPrettyCode<Command>(cmdsArray,

View File

@ -210,7 +210,7 @@ namespace NadekoBot.Modules.Pokemon
}); });
cgb.CreateCommand(Prefix + "heal") cgb.CreateCommand(Prefix + "heal")
.Description($"Heals someone. Revives those who fainted. Costs a {NadekoBot.Config.CurrencyName} | {Prefix}revive @someone") .Description($"Heals someone. Revives those who fainted. Costs a {NadekoBot.Config.CurrencyName} | {Prefix}heal @someone")
.Parameter("target", ParameterType.Unparsed) .Parameter("target", ParameterType.Unparsed)
.Do(async e => .Do(async e =>
{ {
@ -242,7 +242,7 @@ namespace NadekoBot.Modules.Pokemon
return; return;
} }
var target = (usr.Id == e.User.Id) ? "yourself" : usr.Name; var target = (usr.Id == e.User.Id) ? "yourself" : usr.Name;
FlowersHandler.RemoveFlowers(e.User, $"Poke-Heal {target}", amount); await FlowersHandler.RemoveFlowers(e.User, $"Poke-Heal {target}", amount).ConfigureAwait(false);
//healing //healing
targetStats.Hp = targetStats.MaxHp; targetStats.Hp = targetStats.MaxHp;
if (HP < 0) if (HP < 0)
@ -309,7 +309,7 @@ namespace NadekoBot.Modules.Pokemon
await e.Channel.SendMessage($"{e.User.Mention} you don't have enough {NadekoBot.Config.CurrencyName}s! \nYou still need {amount - pts} {NadekoBot.Config.CurrencySign} to be able to do this!").ConfigureAwait(false); await e.Channel.SendMessage($"{e.User.Mention} you don't have enough {NadekoBot.Config.CurrencyName}s! \nYou still need {amount - pts} {NadekoBot.Config.CurrencySign} to be able to do this!").ConfigureAwait(false);
return; return;
} }
FlowersHandler.RemoveFlowers(e.User, $"set usertype to {targetTypeStr}", amount); await FlowersHandler.RemoveFlowers(e.User, $"set usertype to {targetTypeStr}", amount).ConfigureAwait(false);
//Actually changing the type here //Actually changing the type here
var preTypes = DbHandler.Instance.GetAllRows<UserPokeTypes>(); var preTypes = DbHandler.Instance.GetAllRows<UserPokeTypes>();
Dictionary<long, int> Dict = preTypes.ToDictionary(x => x.UserId, y => y.Id.Value); Dictionary<long, int> Dict = preTypes.ToDictionary(x => x.UserId, y => y.Id.Value);

View File

@ -49,11 +49,11 @@ namespace NadekoBot.Modules.Searches.Commands
string result = parser.Parse(expression).ToString(); string result = parser.Parse(expression).ToString();
return result; return result;
} }
catch (OverflowException e) catch (OverflowException)
{ {
return $"Overflow error on {expression}"; return $"Overflow error on {expression}";
} }
catch (FormatException e) catch (FormatException)
{ {
return $"\"{expression}\" was not formatted correctly"; return $"\"{expression}\" was not formatted correctly";
} }