From 53b3aa61ab4a12b8fb1280c9cb93275a51592cd3 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 7 May 2021 08:13:30 -0400 Subject: [PATCH] Add user activity --- commands.go | 4 ++++ config.go | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/commands.go b/commands.go index e86a51d..8cead2d 100644 --- a/commands.go +++ b/commands.go @@ -120,6 +120,10 @@ func Reboot(b BotCommand) bool { return false } +func ActivityReport(b BotCommand) bool { + +} + func BumpSet(b BotCommand) bool { defer log.PanicSafe() bump = false diff --git a/config.go b/config.go index 870eb15..d3edc13 100644 --- a/config.go +++ b/config.go @@ -72,8 +72,11 @@ func adminInteraction(s *discordgo.Session, m string) { func activeInteraction(s *discordgo.Session, m string) { defer log.PanicSafe() + if config.Activity == nil { + config.Activity = make(map[string]int) + } user, _ := s.GuildMember(config.GuildID, m) - counter, ok := config.Stats[user.User.ID] + counter, ok := config.Activity[user.User.ID] if !ok { config.Activity[user.User.ID] = 1 } else {