Browse Source

Add user activity

master
Gregory Rudolph 3 years ago
parent
commit
53b3aa61ab
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 4
      commands.go
  2. 5
      config.go

4
commands.go

@ -120,6 +120,10 @@ func Reboot(b BotCommand) bool { @@ -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

5
config.go

@ -72,8 +72,11 @@ func adminInteraction(s *discordgo.Session, m string) { @@ -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 {

Loading…
Cancel
Save