>gc reduced to 1%
This commit is contained in:
parent
f08f12b0b2
commit
90612676d3
@ -27,8 +27,7 @@ namespace NadekoBot.Modules.ClashOfClans
|
|||||||
|
|
||||||
cgb.CreateCommand(Prefix + "createwar")
|
cgb.CreateCommand(Prefix + "createwar")
|
||||||
.Alias(Prefix + "cw")
|
.Alias(Prefix + "cw")
|
||||||
.Description(
|
.Description($"Creates a new war by specifying a size (>10 and multiple of 5) and enemy clan name. |{Prefix}cw 15 The Enemy Clan")
|
||||||
$"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("size")
|
||||||
.Parameter("enemy_clan", ParameterType.Unparsed)
|
.Parameter("enemy_clan", ParameterType.Unparsed)
|
||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
|
@ -45,8 +45,8 @@ namespace NadekoBot.Modules.Games.Commands
|
|||||||
if (config.GenerateCurrencyChannels.TryGetValue(e.Channel.Id, out cd))
|
if (config.GenerateCurrencyChannels.TryGetValue(e.Channel.Id, out cd))
|
||||||
if (!plantpickCooldowns.TryGetValue(e.Channel.Id, out lastSpawned) || (lastSpawned + new TimeSpan(0, cd, 0)) < now)
|
if (!plantpickCooldowns.TryGetValue(e.Channel.Id, out lastSpawned) || (lastSpawned + new TimeSpan(0, cd, 0)) < now)
|
||||||
{
|
{
|
||||||
var rnd = Math.Abs(GetRandomNumber());
|
var rnd = Math.Abs(rng.Next(0,101));
|
||||||
if ((rnd % 2) == 0)
|
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`") };
|
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; });
|
plantedFlowerChannels.AddOrUpdate(e.Channel.Id, msgs, (u, m) => { m.ForEach(async msgToDelete => { try { await msgToDelete.Delete(); } catch { } }); return msgs; });
|
||||||
|
Loading…
Reference in New Issue
Block a user