switchblade icon indicating copy to clipboard operation
switchblade copied to clipboard

Monthly Guild Stats

Open zerinho6 opened this issue 6 years ago • 6 comments

A command that would display some server stats which would display certain informations.

Informations that would be displayed:

-Member Count -Role Count -Channels Count

Additional Ideas...

-Ban Count -Kick Count -Active Channels

Active Channels

Active Channels would be channels that...

  • For text channels: If the channel have received 30 or more messages.
  • For music channels 2 or more users(Only 1 bot count) in the channel

Now, the music channel is a bit tricky because trolls could just join the channel and leave and do that for each one, but then..that's not exactly our fault.

How would it work?

First, the server needs to have atleast x members, I recommend 25 or 50 at max, then someone with MANAGE_GUILD permission would need to enable the module so the bot would put it on a JSON file with other guilds that want the Stats, then, every day the bot would execute a function that would check if the last day checked was today, if not, it would check, for each guild that wants the stats, if it was already updated this month, if not it would write in another file the stats in a format like this:

{
    "guildID": {
        "Year": {
            "Month": {
                "memberCount": 0,
                "roleCount": 0,
                "channelCount": 0
            }
        }
    }
}

zerinho6 avatar Jun 17 '19 22:06 zerinho6

JSON as database?????? NOOOOOO PLS!!!!!!!!!

fersilva16 avatar Jun 18 '19 00:06 fersilva16

I mean, it's your choice.

zerinho6 avatar Jun 18 '19 00:06 zerinho6

I mean, MongoDB serializes stuff in JSON

pedrofracassi avatar Jun 18 '19 01:06 pedrofracassi

Yeah JSON isn't bad, but with our current configuration, that wouldn't be possible, since dokku just gets the new files from GitHub, deleting anything existant. It's the same procedure that Heroku does.

dsgpaiva avatar Jun 18 '19 16:06 dsgpaiva

STORE IT ON THE DATABASE

pedrofracassi avatar Jun 18 '19 16:06 pedrofracassi

This shouldn't be done anymore since server insights is now a thing.

moruzerinho6 avatar Aug 05 '20 01:08 moruzerinho6