also check targ for null or whitespace

This commit is contained in:
fkndean 2016-11-07 07:29:36 -05:00
parent c06b1ae33c
commit f9fb9d2f76

View File

@ -471,7 +471,7 @@ $@"🌍 **Weather for** 【{obj["target"]}】
{ {
var channel = (ITextChannel)umsg.Channel; var channel = (ITextChannel)umsg.Channel;
var arg = query; var arg = query;
if (string.IsNullOrWhiteSpace(arg)) if (string.IsNullOrWhiteSpace(targ) || string.IsNullOrWhiteSpace(arg))
{ {
await channel.SendMessageAsync("💢 Please enter `target query`.").ConfigureAwait(false); await channel.SendMessageAsync("💢 Please enter `target query`.").ConfigureAwait(false);
return; return;