>gc reduced to 1%

This commit is contained in:
Kwoth 2016-07-19 23:27:19 +02:00
parent f08f12b0b2
commit 90612676d3
2 changed files with 3 additions and 4 deletions

View File

@ -27,8 +27,7 @@ namespace NadekoBot.Modules.ClashOfClans
cgb.CreateCommand(Prefix + "createwar")
.Alias(Prefix + "cw")
.Description(
$"Creates a new war by specifying a size (>10 and multiple of 5) and enemy clan name. |{Prefix}cw 15 The Enemy Clan")
.Description($"Creates a new war by specifying a size (>10 and multiple of 5) and enemy clan name. |{Prefix}cw 15 The Enemy Clan")
.Parameter("size")
.Parameter("enemy_clan", ParameterType.Unparsed)
.Do(async e =>

View File

@ -45,8 +45,8 @@ namespace NadekoBot.Modules.Games.Commands
if (config.GenerateCurrencyChannels.TryGetValue(e.Channel.Id, out cd))
if (!plantpickCooldowns.TryGetValue(e.Channel.Id, out lastSpawned) || (lastSpawned + new TimeSpan(0, cd, 0)) < now)
{
var rnd = Math.Abs(GetRandomNumber());
if ((rnd % 2) == 0)
var rnd = Math.Abs(rng.Next(0,101));
if (rnd == 0)
{
var msgs = new[] { await e.Channel.SendFile(GetRandomCurrencyImagePath()), await e.Channel.SendMessage($"❗ A random {NadekoBot.Config.CurrencyName} appeared! Pick it up by typing `>pick`") };
plantedFlowerChannels.AddOrUpdate(e.Channel.Id, msgs, (u, m) => { m.ForEach(async msgToDelete => { try { await msgToDelete.Delete(); } catch { } }); return msgs; });