• warforever.com is open to the public, non-registered users can post and download resources for free. Have a nice stay!

[NixFifty] Discord Integration

XF 2.0 / 2.1 / 2.2 / 2.3 [NixFifty] Discord Integration 2.8.8

valaiVerified member

Administrator

Staff member
Vip Member
Reputation: 100%
Messages
1,039
Reaction score
71
Discord Integration allows you to establish a connection and manage your Discord server from the comfort of the XenForo Admin Control Panel. This is a free upgrade if you already own an active license to the original Discord Integration.

hjl.png


Features :
  • Allows for XenForo user groups to be synced with Discord server roles. Essentially this allows you to automate the giving and removing of Discord server roles based on the groups that a XenForo user is part of. Users can associate their Discord identities with their XenForo usernames to establish a sync.
  • Discord nicknames can also be updated to match forum names.
  • New for XenForo 2.x: Allow the bot to show up as online and display a custom status message.
  • Manage your Discord instance from the ACP.
  • Allow your users to register and sign up via Discord.
  • Send alerts to connected users and channels via the ACP.
  • Automatically post links to threads from XenForo forums to defined Discord channels as soon as they're posted. The user who posted the thread, the thread title, a short snippet and a link to the thread are included in the message.
    • This is set on a per-forum basis allowing you to fine-tune what channels should get the notifications.
  • New for XenForo 2.x: Automatically post links to resources from XenForo Resource Manager to defined Discord channels as soon as they're posted. The user who posted the resource, the resource title, a short snippet and a link to the resource are included in the message.
    • This is set on a per-category basis allowing you to fine-tune what channels should get the notifications.
  • Allow staff members with permission to 'promote' links to threads to Discord channels.
  • Allow users to receive watch notifications from forums and threads they specify (in addition to emails and alerts). They will receive these notifications privately from your configured bot. There are plans for future expansion with 1-to-1 communication with the bot.
  • New for XenForo 2.x:The bot can now send XenForo alerts straight to your Discord DMs. All types of alerts are supported out of the box with zero configuration required.
    • Users can opt-out of this behaviour by adjusting the appropriate setting within their Account Preferences area.
Installation :
  1. Extract the contents of the .zip file provided upon successful purchase.
  2. Upload the contents of the 'upload' folder to your root XenForo directory.
  3. Install the add-on through the XenForo Admin Control Panel.
  4. Create a Discord Web API application by going here.
    1. Set your App Name to what you want your bot to be called. You may optionally set a description and icon for your bot.
    2. Ensure you have a Redirect URL set in the form of your board URL followed by connected_account.php. So for example:
    3. Code:
      https://mysite.com/connected_account.php
    4. Click 'Create App' and your application will have now been created. You'll now see a new option that says 'Create a Bot User'. Click this and accept the warning. Ensure 'Public Bot' and 'Require OAuth2 Code Grant' are unchecked.
    5. Once you have created your Discord Web API application, it's time to copy the values for 'Client ID', 'Client Secret' and 'Token' to the Discord connected provider in the XenForo Admin Control Panel -> Setup -> Connected providers.
    6. You'll also need your Discord Server / Guild ID which can be obtained by following the steps listed here.
    7. Once you've done this, be sure to use the 'Test Discord Integration' located at XenForo Admin Control Panel -> Tools to make sure everything is dandy and you're good to go!
dhu.png


qgj.png


lop.png


qyk.png


Version 2.2.9 :
Handle errors from Discord’s API being down better.
Allow phrases to be used within alert messages to Discord channels.
Update bundled utils.

Version 2.3.0 change :
Allow users to opt-out of receiving specific alerts on Discord.
Add the ability to alert a Discord channel when resource updates are posted.
Add the ability to alert a Discord channel when thread replies are posted.
Add an icon to the option group.
Remove the test for WebSocket as it is no longer useful.
Minor improvements to the JavaScript that opens a WebSocket.
Throw a prettier error if the NodeJS bot isn't configured properly.

Version 2.3.1 change : Make sure opt-out column is dropped on uninstall.

Version 2.4.0 change :

Add the ability to automatically add users to your Discord server when they first associate their account.
Switch API and other URLs from discordapp.com to discord.com. This is in line with Discord's recently announced endpoint migration that will come in to effect on November 7, 2020.
Bump PHP version requirement to 7.2.0 or greater.
Bump XenForo version requirement to 2.1.0 or greater.
Other assorted code improvements and clean-up.

Version 2.4.2 change : Fix an issue preventing new thread reply notifications from being sent to Discord.

Version 2.5.0 change :
Require XenForo 2.2+.
Require PHP 7.2+.
Require Standard Library.
Confirm support for XF 2.2.0.
Harden various template modifications.
Remove user from server roles when they disassociate or get banned.

Version 2.5.1 change : Strip extraneous characters from mirrored alert messages

Version 2.5.2 change : Add support for announcement channels so notifications can be cross-posted to them.

Version 2.5.3 change :
Minor rework of the option to prevent registering and/or logging in with Discord.
Add missing user change log phrase.

Version 2.5.4 change :
If usernames are being synced, ensure any username changes to Discord are synced too.
Add an option to kick users from your Discord server if they disconnect their forum account.
If a user is banned on your forum, this will now be mapped to Discord properly rather than disconnecting them.
Fix blocking user creation when add-on is disabled.

Version 2.5.5 change : Add an option to announce new associations to a specific Discord channel.

Version 2.5.6 change : Simplify the process of opting in to mirrored Discord alerts to prevent confusion.

Version 2.5.7 change :
When sending a notification to Discord, include the author's avatar if they have one.
Handle cases where optout value may be nulled out.

Version 2.5.8 change :
- Avoid throwing an error when a DM with a Discord user can't be opened.
- Ensure connection exceptions are caught.
- When an admin sends alerts to discord, require a channel to be selected
- Fix XFRM resource updates did not trigger discord notifications
- Add option to opt-out of Discord DMs for new conversation messages

Version 2.6.0 changes :
- Fix an issue where syncing with users in a paid Discord role would silently fail.
- Add support for Tickets add-on.
- Add an option for users to disable alerts from being sent to their Discord DMs.
- Add an option for users to disable conversation notifications from being sent to their Discord DMs.
- Add an option for admins to apply registration defaults for Discord alert and conversation notifications.
- Force global namespace for functions which are known to be optimizable to bytecode in php, or known global functions to avoid a current namespace lookup for the function.

Version 2.6.1 :
Import native functions.
Improve performance and efficiency when syncing.
Ensure channel list isn't serving a stale cache of channels.
When inviting the bot to your server, pre-select the server on the server list.
Compatibility fix with Report Centre Essentials v2.6.0+
When notifying a channel about a new report, include additional metadata.
Fix an issue with Tickets to Discord notifications.
Fix notification handling for content created by guest users.

Version 2.7.0 :
Add support for multiple servers that can be used as notification targets.
Use a background queue to dispatch Discord notifications to avoid blocking sending alerts and encountering rate limiting.
Significant rework of role syncing to be more reliable.
Use background queue for role syncing.
Add a new option to sync avatars from Discord.
Add support for Discord server events to the API wrapper.
Add support for Xon's Threadmarks add-on.
Fix incorrect function visibility for some extended methods.
Trigger new thread notifications on moving threads, and copying/moving posts to new threads.
When uninstalling the add-on, ensure the connected account provider is actually removed.
Fix "Link Discord account" permission could cause the "Connected accounts" button to be flaky.
Update dependencies for the companion NodeJS bot.

Version 2.7.1 :
Adjust column types for various columns to account for older MySQL versions.
Fix "Include replies made to threads" option not being set.
Fix "Enable syncing of XenForo bans with Discord bans" was not respected.
Fix new/re-opened report notifications being flipped.

Version 2.7.3 :

- Add option for additional servers to be disabled.
- Add option to kick users based on user group membership.
- Add option to kick users when they disassociate from Discord.
- When viewing server details, display current permissions for the bot user to aid troubleshooting.
- Various improvements to sync process and error handling.

Version 2.7.4 :

- Add widget to display current number of online users in a specified Discord server.
- Minor improvements and cleanup for syncing.
- Improve PHP 8.1 compatibility when all Discord servers have been disabled.
- Track account being connected to Discord within user change log.
- Fix error during upgrade when no valid Discord servers are setup.
- Fix bad default for xf_forum table when add-on is disabled.
- Fix uninstaller.

Version 2.7.5 :
- Fix missing route for associated groups.

Version 2.7.6 :

- Improve tracking of the nf_discord_account_connected flag
- Ensure the Discord queue is dequeued on add-on uninstall.
- Fix error when trying to access the users API endpoint.
- Fix error when there is a queued job but the API is unavailable.
- Fix "Kick from Discord server on dissociation" not working as expected.
- Fix "Enable syncing of XenForo bans with Discord bans" being ignored when a ban was deleted.

Version 2.7.7 :

- If a DM from the site to a user fails, disable the feature and send a site alert.
- Cache server object to reduce database queries.
- Add option to log when Discord rate limits are being hit.
- Add option to log when Discord is hitting permission failures.
- Adjust retry times to avoid clock skew.
- Fix the wrong user being linked to a conversation DM.
- Other assorted API wrapper code improvements.
Version 2.7.8 :
- Add initial support for cross-posting content to Discord forum channels.

Version 2.8.0 :
  • Add support for multiple servers when using XenForo to Discord role syncing.
  • Add support for XenForo Media Gallery and send notifications to Discord when new media is uploaded.
  • Add support for XR Product Manager and send notifications to Discord when products are purchased.
  • Add an option to globally disable sending Discord DMs.
  • Add a per-server allow list of user groups that can join a server.
  • First sync notifications now support multiple servers.
  • Display guild ID when viewing the server list.
  • Archive queue jobs to a separate table for additional logging.
  • When updating a resource, include the resource icon in the notification if it exists.
  • You may now upload a custom footer icon to be displayed within notifications.
  • The color associated with a notification can now be customised.
  • Include additional troubleshooting steps when Discord roles can not be fetched.
  • Update included widget to look and feel more native for easier restyling.
  • Update channel listing in XenForo admin panel to display text channels from all connected servers.
  • Replace bundled companion bot with a PHP-based one.
  • Fix not being able to update channel name and topic information from the admin panel.
  • Fix "Kick from Discord server on dissociation" option not reliably kicking the user.
  • Other assorted bits of code clean up.
Version 2.8.1 :
  • Include additional contextual information when sending a notification to Discord. The content of these messages can be customised by editing the "nfDiscord_notice.*" phrases.
  • Fix per-server join announcements not being sent if the channel is on another server.
  • Fix "Join pending" not displaying correctly for relevant servers when the user refreshes the "Connected accounts" page.
  • Fix XF=>Discord sync logic could fail if the announcement channel was not set.
Version 2.8.2 :
  • Add "server-ids" argument to xf-rebuild:nf-discord-sync-log command.
  • Reduce API calls when syncing XF usernames to Discord server usernames.
  • Fix connected_account_associated_nfDiscord template was out of date.
  • Fix updating the XF user group to Discord role mapping did not reliably re-sync all applicable users.
  • Ensure server ID is of the correct type when syncing.
Version 2.8.3 :
  • Harden function to get Discord server mapping.
  • Fix group sync position tracking not being displayed correctly.

Version 2.8.0 :Version 2.8.4 :
  • Add a per-server "Kick user if they are no longer in allowed user groups" flag.
  • Avoid duplicate key errors when archiving jobs.
  • Give up trying to trigger jobs if they have failed 3 or more times.
  • Properly clean up jobs that have failed.
  • Fix kicking a user not actually kicking them.
  • Fix old sync long entries not being pruned as expected.
  • When modifying the XenForo user-group to Discord role mappings, only trigger a re-sync for the affected server to avoid excessive API calls.
  • Minor code improvements and stylistic changes.
Version 2.8.5 :
  • Use password field for bot token and client secret values in the admin panel.
  • Add a per-server "Kick user if they are no longer in allowed user groups" flag.
  • Fix old sync long entries not being pruned as expected.
  • When modifying the XenForo user-group to Discord role mappings, only trigger a re-sync for the affected server to avoid excessive API calls.
Note that some functionality mentioned as being included in the 2.8.4 release was not actually included so this release resolves that.

Version 2.8.6 :
  • PHP 8.4 compatibility fixes.
  • Fix "TypeError: XF\Mvc\Entity\Entity::__construct(): Argument #1 ($em) must be of type XF\Mvc\Entity\Manager, XF\Pub\App given" on editing a server that requires a user resync.
Version 2.8.7 : Initial support for XenForo 2.3.

Version 2.8.8 :
  • Add support for promoting threads to multiple channels across multiple servers at once.
  • Update bundled bot dependencies.
  • Fix an issue where the "Promote to Discord" message was not being sent.
  • Fix an issue where Discord notification opt-out controls were not displayed on XF 2.3.
 

Attachments

Last edited:
Relate Threads
XF2 [8WR] Discord Integration
XF2 [8WR] Discord Integration bởi valai,
[tl] Sendy Integration
[tl] Sendy Integration bởi valai,
[tl] Mailgun Integration
[tl] Mailgun Integration bởi valai,
[NixFifty] Tickets 2.6.4
[NixFifty] Tickets 2.6.4 bởi valai,
Back
Top