Fix bumpset
This commit is contained in:
@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user