Fixed error, hopefuly nobody sees this commit
This commit is contained in:
parent
90329aca38
commit
1483d9d33e
@ -27,7 +27,13 @@ namespace NadekoBot.Classes
|
|||||||
{
|
{
|
||||||
configs = JsonConvert
|
configs = JsonConvert
|
||||||
.DeserializeObject<ConcurrentDictionary<ulong, ServerSpecificConfig>>(
|
.DeserializeObject<ConcurrentDictionary<ulong, ServerSpecificConfig>>(
|
||||||
File.ReadAllText(filePath));
|
File.ReadAllText(filePath), new JsonSerializerSettings() {
|
||||||
|
Error = (s,e) => {
|
||||||
|
if (e.ErrorContext.Member.ToString() == "GenerateCurrencyChannels") {
|
||||||
|
e.ErrorContext.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -239,7 +245,7 @@ namespace NadekoBot.Classes
|
|||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)((int)ServerId + Username.Length + (int)Type);
|
return (int)ServerId + Username.Length + (int)Type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,15 +364,15 @@ $@"🌍 **Weather for** 【{obj["target"]}】
|
|||||||
});
|
});
|
||||||
|
|
||||||
cgb.CreateCommand(Prefix + "magicitem")
|
cgb.CreateCommand(Prefix + "magicitem")
|
||||||
.Alias(Prefix + "mi")
|
.Alias(Prefix + "mi")
|
||||||
.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 magicItems = JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json"));
|
var magicItems = JsonConvert.DeserializeObject<List<MagicItem>>(File.ReadAllText("data/magicitems.json"));
|
||||||
var item = magicItems[rng.Next(0, magicItems.Count)].ToString();
|
var item = magicItems[rng.Next(0, magicItems.Count)].ToString();
|
||||||
|
|
||||||
await e.Channel.SendMessage(item).ConfigureAwait(false);
|
await e.Channel.SendMessage(item).ConfigureAwait(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
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.")
|
||||||
|
Loading…
Reference in New Issue
Block a user