Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.09k stars 2.35k forks source link

Inactive player timeout & timer touch ups. #2366

Closed itsTheFae closed 6 months ago

itsTheFae commented 7 months ago

Description

This PR builds on the recently added channel inactivity timer. It adds one new option LeavePlayerInactiveFor which allows control over automatically disconnecting a player from voice when it is paused, or otherwise not playing music for the set duration. It does not impact the LeaveAfterSong setting which will still immediately disconnect. Some variable and function names were changed to be more consistent and clarify their intent in code.
In addition, the timer options can now be set using a phrase containing time duration(s) which are briefly documented in the example_options.ini file.