Browse Source

Fix bumpset

master
Gregory Rudolph 3 years ago
parent
commit
b6716eba46
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 4
      commands.go

4
commands.go

@ -124,9 +124,9 @@ func BumpSet(b BotCommand) bool { @@ -124,9 +124,9 @@ func BumpSet(b BotCommand) bool {
defer log.PanicSafe()
bump = false
parts := strings.Split(b.Message.Content, " ")
timer, err := strconv.Atoi(parts[1])
timer, err := strconv.Atoi(parts[2])
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
}
config.BumpTime = time.Now().Add(time.Duration(timer) * time.Minute).Add(-2 * time.Hour)

Loading…
Cancel
Save