Add user activity
This commit is contained in:
@ -120,6 +120,10 @@ func Reboot(b BotCommand) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ActivityReport(b BotCommand) bool {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func BumpSet(b BotCommand) bool {
|
func BumpSet(b BotCommand) bool {
|
||||||
defer log.PanicSafe()
|
defer log.PanicSafe()
|
||||||
bump = false
|
bump = false
|
||||||
|
|||||||
@ -72,8 +72,11 @@ func adminInteraction(s *discordgo.Session, m string) {
|
|||||||
|
|
||||||
func activeInteraction(s *discordgo.Session, m string) {
|
func activeInteraction(s *discordgo.Session, m string) {
|
||||||
defer log.PanicSafe()
|
defer log.PanicSafe()
|
||||||
|
if config.Activity == nil {
|
||||||
|
config.Activity = make(map[string]int)
|
||||||
|
}
|
||||||
user, _ := s.GuildMember(config.GuildID, m)
|
user, _ := s.GuildMember(config.GuildID, m)
|
||||||
counter, ok := config.Stats[user.User.ID]
|
counter, ok := config.Activity[user.User.ID]
|
||||||
if !ok {
|
if !ok {
|
||||||
config.Activity[user.User.ID] = 1
|
config.Activity[user.User.ID] = 1
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user