sneaky game will say a number of rewarded users at the end

This commit is contained in:
Kwoth
2017-02-03 11:36:58 +01:00
parent 8791bc55f5
commit f850d62c89
4 changed files with 18 additions and 8 deletions

View File

@@ -78,6 +78,7 @@ namespace NadekoBot.Modules.Gambling
_secretCode += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)];
}
var game = NadekoBot.Client.Game?.Name;
await NadekoBot.Client.SetGameAsync($"type {_secretCode} for " + NadekoBot.BotConfig.CurrencyPluralName)
.ConfigureAwait(false);
try
@@ -94,10 +95,11 @@ namespace NadekoBot.Modules.Gambling
await Task.Delay(num * 1000);
NadekoBot.Client.MessageReceived -= SneakyGameMessageReceivedEventHandler;
var cnt = _sneakyGameAwardedUsers.Count;
_sneakyGameAwardedUsers.Clear();
_secretCode = String.Empty;
await NadekoBot.Client.SetGameAsync($"SneakyGame event ended.")
await NadekoBot.Client.SetGameAsync($"SneakyGame event ended. {cnt} users received a reward.")
.ConfigureAwait(false);
}

View File

@@ -231,7 +231,7 @@ namespace NadekoBot.Modules.Games
private static Tuple<string, Stream> GetRandomCurrencyImage()
{
var rng = new NadekoRandom();
var images = NadekoBot.Images.CurrencyImages;
var images = NadekoBot.Images.Currency;
return images[rng.Next(0, images.Count)];
}