From bfc3acd40dc1d046a09569a1298666c8bea699cd Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 9 Feb 2016 23:49:58 +0100 Subject: [PATCH] NadekoFlowers, fix --- NadekoBot/Classes/FlowersHandler.cs | 8 +++++++- NadekoBot/Modules/Gambling.cs | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Classes/FlowersHandler.cs b/NadekoBot/Classes/FlowersHandler.cs index b4dd1128..62e33ef7 100644 --- a/NadekoBot/Classes/FlowersHandler.cs +++ b/NadekoBot/Classes/FlowersHandler.cs @@ -7,6 +7,8 @@ using System.Threading.Tasks; namespace NadekoBot.Classes { static class FlowersHandler { public static async Task AddFlowersAsync(Discord.User u, string reason, int amount) { + if (amount <= 0) + return; await Task.Run(() => { DBHandler.Instance.InsertData(new _DataModels.CurrencyTransaction { Reason = reason, @@ -14,7 +16,11 @@ namespace NadekoBot.Classes { Value = amount, }); }); - await u.SendMessage("👑Congratulations!👑\nYou got: 🌸🌸"); + string flows = ""; + for (int i = 0; i < amount; i++) { + flows += "🌸"; + } + await u.SendMessage("👑Congratulations!👑\nYou got: "+flows); } } } diff --git a/NadekoBot/Modules/Gambling.cs b/NadekoBot/Modules/Gambling.cs index d06827f8..6ab158f4 100644 --- a/NadekoBot/Modules/Gambling.cs +++ b/NadekoBot/Modules/Gambling.cs @@ -49,10 +49,10 @@ namespace NadekoBot.Modules }); */ cgb.CreateCommand("$$$") - .Description("Check how many NadekoPoints you have.") + .Description("Check how many NadekoFlowers you have.") .Do(async e => { var pts = Classes.DBHandler.Instance.GetStateByUserId((long)e.User.Id)?.Value ?? 0; - string str = $"`You have {pts} NadekoPoints".SnPl((int)pts)+"`\n"; + string str = $"`You have {pts} NadekoFlowers".SnPl((int)pts)+"`\n"; for (int i = 0; i < pts; i++) { str += "🌸"; }