command that turns on an event, then checks if state leads leave and join the vc?
track voice state changes (when a member joins and leaves this gets fired)
check if the change was triggered from someone with the "State Lead" role
if they joined (new voice state is truthy, old voice state is falsy), then add an entry, and the entry timestamp, key by user id
if they leave (the opposite), update existing entry and set the leave timestamp. if the record doesnt exist, insert a new one with an unknown start time (so we have record they were in it at least). low chance of this happening but stuff happens.
Command that displays activity of each channel - suggested by @ilisium
command that turns on an event, then checks if state leads leave and join the vc?
track voice state changes (when a member joins and leaves this gets fired)
check if the change was triggered from someone with the "State Lead" role
if they joined (new voice state is truthy, old voice state is falsy), then add an entry, and the entry timestamp, key by user id
if they leave (the opposite), update existing entry and set the leave timestamp. if the record doesnt exist, insert a new one with an unknown start time (so we have record they were in it at least). low chance of this happening but stuff happens.
Command that displays activity of each channel - suggested by @ilisium