'Statistics on discord streaming activity
I need to collect data about which users watching another user's discord stream so I can analyze how attractive the streaming is to other users as well as retention rate for the streaming activity. Is there any method or bots that can help me doing this? If not, is the API open enough so I can code my own bot to do this?
Solution 1:[1]
There is not an API feature that would be able to do this for you. You could have a log somewhere (sql database) that logs when they join a voice channel and when they leave (using the on('voiceStateUpdate') event, then calculate how long there were in.
Would need to make sure that someone was streaming in it first:
https://discord.js.org/#/docs/main/stable/class/VoiceState?scrollTo=streaming
Then log time that voiceStateUpdate occurred.
It'd be a little complex but possible, just not directly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gh0st |
