Moved ~av from conversations to searches

This commit is contained in:
Master Kwoth 2016-06-29 19:17:37 +02:00
parent 112cf972ac
commit 50f8cec33e
2 changed files with 15 additions and 15 deletions

View File

@ -255,21 +255,6 @@ namespace NadekoBot.Modules.Conversations
await e.Channel.SendMessage(construct).ConfigureAwait(false);
});
cgb.CreateCommand("av")
.Alias("avatar")
.Parameter("mention", ParameterType.Required)
.Description("Shows a mentioned person's avatar.\n**Usage**: ~av @X")
.Do(async e =>
{
var usr = e.Channel.FindUsers(e.GetArg("mention")).FirstOrDefault();
if (usr == null)
{
await e.Channel.SendMessage("Invalid user specified.").ConfigureAwait(false);
return;
}
await e.Channel.SendMessage(await usr.AvatarUrl.ShortenUrl()).ConfigureAwait(false);
});
});
}

View File

@ -475,6 +475,21 @@ $@"🌍 **Weather for** 【{obj["target"]}】
}
});
cgb.CreateCommand(Prefix + "av")
.Alias(Prefix + "avatar")
.Parameter("mention", ParameterType.Required)
.Description("Shows a mentioned person's avatar.\n**Usage**: ~av @X")
.Do(async e =>
{
var usr = e.Channel.FindUsers(e.GetArg("mention")).FirstOrDefault();
if (usr == null)
{
await e.Channel.SendMessage("Invalid user specified.").ConfigureAwait(false);
return;
}
await e.Channel.SendMessage(await usr.AvatarUrl.ShortenUrl()).ConfigureAwait(false);
});
});
}
}