Fix bumpset

This commit is contained in:
2021-05-06 08:14:11 -04:00
parent 3d6d5c64b9
commit b6716eba46

View File

@ -124,9 +124,9 @@ func BumpSet(b BotCommand) bool {
defer log.PanicSafe() defer log.PanicSafe()
bump = false bump = false
parts := strings.Split(b.Message.Content, " ") parts := strings.Split(b.Message.Content, " ")
timer, err := strconv.Atoi(parts[1]) timer, err := strconv.Atoi(parts[2])
if err != nil { if err != nil {
b.Session.ChannelMessageSend(b.Message.ChannelID, fmt.Sprintf("Unable to decode timer: %+v", parts[1])) b.Session.ChannelMessageSend(b.Message.ChannelID, fmt.Sprintf("Unable to decode timer: %+v", parts[2]))
return false return false
} }
config.BumpTime = time.Now().Add(time.Duration(timer) * time.Minute).Add(-2 * time.Hour) config.BumpTime = time.Now().Add(time.Duration(timer) * time.Minute).Add(-2 * time.Hour)