From 8fadff4092d2c92f495555c677ce2963e2f2f5d0 Mon Sep 17 00:00:00 2001 From: runebaas Date: Tue, 4 Jun 2019 23:00:16 +0200 Subject: [PATCH] Cookies timeout is now at midnight instead of every 24h --- Geekbot.net/Commands/Rpg/Cookies.cs | 4 ++-- Geekbot.net/Lib/Localization/Translations.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Geekbot.net/Commands/Rpg/Cookies.cs b/Geekbot.net/Commands/Rpg/Cookies.cs index f22eccf..3c41044 100644 --- a/Geekbot.net/Commands/Rpg/Cookies.cs +++ b/Geekbot.net/Commands/Rpg/Cookies.cs @@ -38,9 +38,9 @@ namespace Geekbot.net.Commands.Rpg { var transContext = await _translation.GetGuildContext(Context); var actor = await GetUser(Context.User.Id); - if (actor.LastPayout.Value.AddHours(24) > DateTimeOffset.Now) + if (actor.LastPayout.Value.AddDays(1).Date > DateTime.Now.Date) { - var formatedWaitTime = transContext.FormatDateTimeAsRemaining(actor.LastPayout.Value.AddHours(24)); + var formatedWaitTime = transContext.FormatDateTimeAsRemaining(DateTimeOffset.Now.AddDays(1).Date); await ReplyAsync(transContext.GetString("WaitForMoreCookies", formatedWaitTime)); return; } diff --git a/Geekbot.net/Lib/Localization/Translations.yml b/Geekbot.net/Lib/Localization/Translations.yml index 04835a2..4bf4d14 100644 --- a/Geekbot.net/Lib/Localization/Translations.yml +++ b/Geekbot.net/Lib/Localization/Translations.yml @@ -90,8 +90,8 @@ cookies: EN: "You got {0} cookies, there are now {1} cookies in you cookie jar" CHDE: "Du häsch {0} guetzli becho, du häsch jetzt {1} guetzli ih dr büchse" WaitForMoreCookies: - EN: "You already got cookies in the last 24 hours, you can have more cookies in {0}" - CHDE: "Du hesch scho guetzli becho ih de letzti 24 stund, du chasch meh ha in {0}" + EN: "You already got cookies today, you can have more cookies in {0}" + CHDE: "Du hesch scho guetzli becho hüt, du chasch meh ha in {0}" InYourJar: EN: "There are {0} cookies in you cookie jar" CHDE: "Es hät {0} guetzli ih dineri büchs"