small thingy

This commit is contained in:
Master Kwoth 2016-04-01 19:54:13 +02:00
parent dc6758af76
commit e53aab1870
2 changed files with 7 additions and 6 deletions

View File

@ -91,7 +91,8 @@ namespace NadekoBot.Modules.Administration.Commands
{
ch = e.Channel;
}
else {
else
{
ch = e.Server.FindChannels(meorchStr).FirstOrDefault();
}

View File

@ -360,17 +360,17 @@ $@"🌍 **Weather for** 【{obj["target"]}】
await e.Channel.SendMessage("`" + JObject.Parse(response)["value"]["joke"].ToString() + "` 😆");
});
cgb.CreateCommand(Prefix + "magicitem")
cgb.CreateCommand(Prefix + "mi")
.Alias("magicitem")
.Description("Shows a random magicitem from <https://1d4chan.org/wiki/List_of_/tg/%27s_magic_items>")
.Do(async e =>
{
var db =JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json"));
var item = db[rng.Next(0, db.Count)].ToString();
var magicItems = JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json"));
var item = magicItems[rng.Next(0, magicItems.Count)].ToString();
await e.Channel.SendMessage(item);
});
cgb.CreateCommand(Prefix + "revav")
.Description("Returns a google reverse image search for someone's avatar.")
.Parameter("user", ParameterType.Unparsed)