|
|
@ -141,6 +141,16 @@ func saveConfig() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func bumpSetTime(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
|
|
|
|
bump = false |
|
|
|
|
|
|
|
parts := strings.Split(m.Content, " ") |
|
|
|
|
|
|
|
timer, err := strconv.Atoi(parts[1]) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("Unable to decode timer: %+v", parts[1])) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
config.BumpTime = time.Now().Add(time.Duration(timer) * time.Minute).Add(-2 * time.Hour) |
|
|
|
|
|
|
|
s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("New bump time: %+v, expecting bump at %+v", config.BumpTime, config.BumpTime.Add(2*time.Hour))) |
|
|
|
|
|
|
|
} |
|
|
|
func findVerification(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
func findVerification(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
defer log.PanicSafe() |
|
|
|
defer log.PanicSafe() |
|
|
|
parts := strings.Split(m.Content, " ") |
|
|
|
parts := strings.Split(m.Content, " ") |
|
|
|