XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Perhaps this is a dumb question, but is there a way to see the connected account in a user's profile? I.E. show the discord ID in the user's profile, at least for administrators.
 
Not sure but if you want them to match you can enable the setting that makes their Discord nickname on your Discord server match their forum name.
 
Hi, I have recently purchased this plugin and installed the 2.1.1.8. The discord nickname sync is not working and I get server Errors like below:-

  • ErrorException: [E_NOTICE] Undefined index: dir
  • src/addons/EWR/Discord/Repository/Discord.php:107
  • Generated by: Unknown account
  • Dec 7, 2021 at 11:44 AM
  • Stack trace​

    #0 src/addons/EWR/Discord/Repository/Discord.php(107): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/vhosts...', 107, Array)
    #1 src/addons/EWR/Discord/Repository/Discord.php(288): EWR\Discord\Repository\Discord->patchMember(Object(EWR\Discord\Entity\User), Object(EWR\Discord\Entity\UserConnectedAccount))
    #2 src/addons/EWR/Discord/Cron/Sync.php(9): EWR\Discord\Repository\Discord->syncDiscord()
    #3 src/XF/Job/Cron.php(37): EWR\Discord\Cron\Sync::syncDiscord(Object(XF\Entity\CronEntry))
    #4 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
    #5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
    #6 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
    #7 job.php(43): XF\Job\Manager->runQueue(false, 8)
    #8 {main}

Please suggest how to fix this. Thanks
 

Attachments

  • ErrorXenforo.webp
    ErrorXenforo.webp
    40.1 KB · Views: 8
Jaxel updated XF2 [8WR] Discord Integration with a new update entry:

2.1.1.9 - CHANGELOG

  • BUG FIX: Fixed a double posting bug where the bot will post a thread twice when the first post in a moderated thread gets approved.
  • BUG FIX: Fixed a bug where on some browsers, user role sync relations will not properly apply a default value for the sync direction on managed roles. You will have to click "save" in your admin CP settings once to apply this fix.

Read the rest of this update entry...
 
Small feature request for nodes new threads/replies to discord. You can currently use {user}, {title} and {url}. Possible {node} can be added as well so it shows which node it was posted in?
 
I have recently installed Discord Integration 2.1.1.7 and when I test to see if Discord Integration works it says it passed. Others say this message popped up "There is no valid connected account request available. Please try again."

Here are all the Active and inactive "Connected Account Providers"
1640140938587.webp
 
There's a weird bug with this add-on where a user who tries to connect to the discord server after already having their account connected to the forums will not have their roles sync'd.

The only way it works is if they disconnect their connected discord account, join the server (without a connected account), and then connect their discord account to the forums.
 
There's a weird bug with this add-on where a user who tries to connect to the discord server after already having their account connected to the forums will not have their roles sync'd.

The only way it works is if they disconnect their connected discord account, join the server (without a connected account), and then connect their discord account to the forums.
This is not a bug. This is by design. This addon has no idea what goes on Discord and does not respond to Discord events. When something happens on XenForo, it sends the information to Discord. But when something happens on Discord, that information is not sent to XenForo. This is explained in the FAQ:


How often are accounts synced with Discord?

Accounts are synced one by one on a 1 minute basis by default. This means over a 24 hour period, it can do 1440 account syncs. The reason for this is to prevent rate limiting from the Discord API. When an account is altered on XenForo, it is moved to the front of this sync queue. When an account is altered on Discord, it will have to wait for the next time it comes up in the sync queue.

Keep in mind, that syncs are managed by the XenForo cron job system; which means cron jobs can only run when someone visits your forum. So if your forum is inactive, syncs will be delayed. You can work around this delay in XenForo 2.2 with configurable job triggering.
 
One feature I'd love to see is to post messages from a specific thread to a Discord channel. Instead of an entire node. Would you consider adding something like this @Jaxel ?
 
Nvm, solved the issue with the above reply but I'm unable to remove it. Issue is caused that the Discord's email you are trying to link with your forum account is used by another user on the forums.

Anycase. Would appreciate a fix regarding removing avatar and showing UserID instead.

Also.. Can you make it so we can look up discord ID's in the adminCP to see who the ID is tied to?
Hey man, how did you fix this iv ran into this with a lot of accounts, we have removed the discord bot from the user discord account and all.
 
1644851297755.webp
Had to reset user data base. now when users try to link discord we get this. we have removerd the bot from the server and added a new bot to the server trying to fix this isse with no luck. we have even removed in the user settings and still no luck. any help wouold be nice thanks
 
Heya, any idea what is wrong?

Code:
Server error log
TypeError: Macro admin:option_macros :: option_row() error: usort(): Argument #1 ($array) must be of type array, bool given src/addons/EWR/Discord/Repository/Discord.php:329
Generated by: Ascalon 21 Únor 2022 v 17:54

Stack trace
#0 src/addons/EWR/Discord/Repository/Discord.php(329): usort(false, Object(Closure))
#1 src/addons/EWR/Discord/Option/Channels.php(13): EWR\Discord\Repository\Discord->parseChannels(false)
#2 src/XF/Entity/Option.php(79): EWR\Discord\Option\Channels::renderOption(Object(XF\Entity\Option), Array)
#3 src/XF/Template/Templater.php(1191): XF\Entity\Option->renderDisplayCallback(Array)
#4 internal_data/code_cache/templates/l2/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l2/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#7 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l2/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#9 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#10 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#11 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#12 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#13 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#17 src/XF.php(517): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state
array(4) {
  ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/"
  ["referrer"] => string(59) "https://xxxxxxxxxx/admin.php?options/groups/EWRdiscord/"
  ["_GET"] => array(1) {
    ["options/groups/EWRdiscord/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Heya, any idea what is wrong?

Code:
Server error log
TypeError: Macro admin:option_macros :: option_row() error: usort(): Argument #1 ($array) must be of type array, bool given src/addons/EWR/Discord/Repository/Discord.php:329
Generated by: Ascalon 21 Únor 2022 v 17:54

Stack trace
#0 src/addons/EWR/Discord/Repository/Discord.php(329): usort(false, Object(Closure))
#1 src/addons/EWR/Discord/Option/Channels.php(13): EWR\Discord\Repository\Discord->parseChannels(false)
#2 src/XF/Entity/Option.php(79): EWR\Discord\Option\Channels::renderOption(Object(XF\Entity\Option), Array)
#3 src/XF/Template/Templater.php(1191): XF\Entity\Option->renderDisplayCallback(Array)
#4 internal_data/code_cache/templates/l2/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l2/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#7 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l2/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#9 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#10 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#11 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#12 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#13 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#17 src/XF.php(517): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state
array(4) {
  ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/"
  ["referrer"] => string(59) "https://xxxxxxxxxx/admin.php?options/groups/EWRdiscord/"
  ["_GET"] => array(1) {
    ["options/groups/EWRdiscord/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Does your server not have any public channels?

View attachment 264748
Had to reset user data base. now when users try to link discord we get this. we have removerd the bot from the server and added a new bot to the server trying to fix this isse with no luck. we have even removed in the user settings and still no luck. any help wouold be nice thanks
You may need to manually delete ewr_discord links from your xf_user_connected_account table. Though I make no guarantees that will fix the problem.

Can yo please make it work with php 8.1?
Whats wrong on 8.1?
 
Yes, many. it is community server with 10 minute limit for posting (high verification level), Welcome Screen and Membership Screening.
The API is returning a false value, which means your server link is not set up properly. Start the setup process of the addon over.
 
Top Bottom