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; ch = e.Channel;
} }
else { else
{
ch = e.Server.FindChannels(meorchStr).FirstOrDefault(); 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() + "` 😆"); 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>") .Description("Shows a random magicitem from <https://1d4chan.org/wiki/List_of_/tg/%27s_magic_items>")
.Do(async e => .Do(async e =>
{ {
var db =JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json")); var magicItems = JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json"));
var item = db[rng.Next(0, db.Count)].ToString(); var item = magicItems[rng.Next(0, magicItems.Count)].ToString();
await e.Channel.SendMessage(item); await e.Channel.SendMessage(item);
}); });
cgb.CreateCommand(Prefix + "revav") cgb.CreateCommand(Prefix + "revav")
.Description("Returns a google reverse image search for someone's avatar.") .Description("Returns a google reverse image search for someone's avatar.")
.Parameter("user", ParameterType.Unparsed) .Parameter("user", ParameterType.Unparsed)