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