This commit is contained in:
2021-05-06 08:31:53 -04:00
parent 62738d8a88
commit 160625396c
3 changed files with 9 additions and 9 deletions

View File

@ -82,7 +82,7 @@ func bumpTimer(s *discordgo.Session) {
bump = false bump = false
config.BumpTime = time.Now() config.BumpTime = time.Now()
time.Sleep(2 * time.Hour) time.Sleep(2 * time.Hour)
if time.Since(lastActiveTime) < (5*time.Minute) { if time.Since(lastActiveTime) < (5 * time.Minute) {
s.ChannelMessageSend(lastActiveChan, "!d bump is ready, please use it. (say \"!d bump\" without the quotes)") s.ChannelMessageSend(lastActiveChan, "!d bump is ready, please use it. (say \"!d bump\" without the quotes)")
} }
s.ChannelMessageSend(config.AdminChannel, "!d bump is ready.") s.ChannelMessageSend(config.AdminChannel, "!d bump is ready.")

View File

@ -52,14 +52,14 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
log.LogDebug("%+v found!", keyword) log.LogDebug("%+v found!", keyword)
b.Command = keyword b.Command = keyword
if !cmd.RequiresAdmin { if !cmd.RequiresAdmin {
log.LogDebug("%+v does not require admin, running!") log.LogDebug("%+v does not require admin, running!", cmd.Name)
if !cmd.Exec(b) { if !cmd.Exec(b) {
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help))
} else { } else {
log.LogInfo("Ran command %+v for %+v", cmd.Name, m.Author.Username) log.LogInfo("Ran command %+v for %+v", cmd.Name, m.Author.Username)
} }
} else { } else {
log.LogDebug("%+v does require admin, checking!") log.LogDebug("%+v does require admin, checking!", cmd.Name)
if isAdmin(m.Member) { if isAdmin(m.Member) {
if !cmd.Exec(b) { if !cmd.Exec(b) {
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help))