NadekoFlowers, fix

This commit is contained in:
Master Kwoth 2016-02-09 23:49:58 +01:00
parent 8009b8e995
commit bfc3acd40d
2 changed files with 9 additions and 3 deletions

View File

@ -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);
}
}
}

View File

@ -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 += "🌸";
}