[8WR] Discord Integration

xF1 Add-on [8WR] Discord Integration 1.0.9

No permission to download
  • Added Session Activity details to Discord pages so XenForo won't list the user as "Viewing Unknown page".
  • BUG FIX: fixed a bug that produced a "type" error if your server either did not have any text channels, or did not have any voice channels.
  • BUG FIX: fixed a bug that produced a "null" error if you rebuilt some of your caches.
  • 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.