Add user activity

This commit is contained in:
2021-05-07 08:25:01 -04:00
parent 5222b1b3b6
commit 0df1fae253

View File

@ -122,6 +122,16 @@ func Reboot(b BotCommand) bool {
}
func ActivityReport(b BotCommand) bool {
useCounter := true
counterStop := 4
if len(b.Parts) > 0 {
test, err := strconv.Atoi(b.Parts[0])
if err == nil {
counterStop = test
} else {
useCounter = false
}
}
statistics := "```"
n := map[int][]string{}
counter := 0
@ -135,7 +145,7 @@ func ActivityReport(b BotCommand) bool {
sort.Sort(sort.Reverse(sort.IntSlice(a)))
for _, k := range a {
for _, s := range n[k] {
if counter == 4 {
if useCounter && counter == counterStop-1 {
return true
}
user, err := b.Session.GuildMember(config.GuildID, s)