- Fixed errors with roles getting desync'd.
The way role-syncing works in the Discord API is, whenever you sync a user, it replaces that user's ENTIRE role tree. So if you don't include a role in the list, that role will be lost on the next sync. This is why originally role syncing was 1:1... and in order to make exclusionary role-syncing in the last version I had to double up on the API queries in order to do role comparisons between a user's old roles and the existing list of roles in XenForo's settings...
The problem with this came when people added new roles to their Discord server, but then did not go back to the XenForo Admin CP settings and specifically mark the new roles as "unspecified" (exclusionary) and clicking SAVE so that the new settings were stored in the XenForo database. Since the system did not know those roles existed, it was not considering them exclusionary.
This update makes it so that any roles which are not found in the XenForo database, are assumed to be exclusionary, even if the administrator did not set them up as so.
- Fixed a bug related to $userID not found.