pinano-discord / Pinano-Discord-Bot

A Discord bot for the Pinano guild
MIT License
9 stars 11 forks source link

Fixes for #67, #44, #23 #77

Closed pianiststickman closed 5 years ago

pianiststickman commented 5 years ago

67 Deletion of locked temp room causes room to remain visible on Discord client

44 temp-muted role overwritten in PRC when connected to a PR

23 Commit everybody's lb times at reset

Modifies the voiceStateUpdate handler to only unlock a room if it is not a temp channel we just deleted. Also, refactor the code that handles saving an active session to client_functions.js, and call that from both the voiceStateUpdate handler as well as a new command, p!commit, that commits all active sessions to the database. The weekly leaderboard submission also calls p!commit, so that all sessions are saved and started fresh when the leaderboard resets.

44 is an issue where the individual permission granted for being in a practice room overrides the deny permission given by the Temp Muted role. Therefore, don't grant that permission if the user is in Temp Muted, and just in case they're already in a practice room when they're given the role, recalculate the permission whenever a member's roles are updated.