|
|
|
@ -59,6 +59,7 @@ func saveConfig() {
@@ -59,6 +59,7 @@ func saveConfig() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func adminInteraction(s *discordgo.Session, m string) { |
|
|
|
|
defer log.PanicSafe() |
|
|
|
|
admin, _ := s.GuildMember(config.GuildID, m) |
|
|
|
|
counter, ok := config.Stats[admin.User.ID] |
|
|
|
|
if !ok { |
|
|
|
@ -69,6 +70,18 @@ func adminInteraction(s *discordgo.Session, m string) {
@@ -69,6 +70,18 @@ func adminInteraction(s *discordgo.Session, m string) {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func activeInteraction(s *discordgo.Session, m string) { |
|
|
|
|
defer log.PanicSafe() |
|
|
|
|
user, _ := s.GuildMember(config.GuildID, m) |
|
|
|
|
counter, ok := config.Stats[user.User.ID] |
|
|
|
|
if !ok { |
|
|
|
|
config.Activity[user.User.ID] = 1 |
|
|
|
|
} else { |
|
|
|
|
config.Activity[user.User.ID] = counter + 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func rebootBump() { |
|
|
|
|
time.Sleep(time.Until(config.BumpTime.Add(2 * time.Hour))) |
|
|
|
|
dg.ChannelMessageSend(config.AdminChannel, "!d bump is ready") |
|
|
|
|