Cookies timeout is now at midnight instead of every 24h

This commit is contained in:
runebaas 2019-06-04 23:00:16 +02:00
parent 288c976674
commit 8fadff4092
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 4 additions and 4 deletions

View file

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

View file

@ -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"