feat(debug): adapt xp functions while debug is enabled
This commit is contained in:
parent
84bf4caed2
commit
9f9c27f422
2 changed files with 13 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/redis/go-redis/v9"
|
||||
"gorm.io/gorm"
|
||||
"math"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
@ -98,6 +99,9 @@ func (c *Copaing) HourSinceLastEvent() uint {
|
|||
)
|
||||
return 0
|
||||
}
|
||||
if gokord.Debug {
|
||||
return uint(math.Floor(float64(t-int64(last)) / 60)) // not hours of unix, is minutes of unix
|
||||
}
|
||||
return utils.HoursOfUnix(t - int64(last))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue