XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Thank you. : )

It would be a wonderful feature, but my members were complaining about their devices blowing up.
 
  1. anyone idea about this issue i have
    2018-09-03_23-12-48.webp
  2. this is what i have as settings
    And yes i have a guild ID but removed it for the image
    opera_2018-09-03_23-14-37.webp
  3. and this is what i have on the discord
    opera_2018-09-03_23-16-15.webp
 
@Jaxel
Okay, so I have some problems with getting my new roles carried over to Discord. What I have done now is revamping my rank structure to be based on post counts. I have the following user groups:

Various special ranks such as staff, donator, premium etc.
----
Member ranks based on post counts.
From Tier 1 to Tier 7, one user group for each. Then I've added user group promotions in the ACP, so that once a user has more than messages: X and no more than messages: X, he is promoted to the next tier. Eg, 10 posts for tier 2, 25 for tier 4 etc.

After rebuilding user group promotions cache in XF, this is working perfectly on the XF side. All users have gotten their corresponding tier. Now onto Discord..
I have added all the tier ranks in Discord roles, and paired them with the corresponding user groups in Discord addon settings in XF. Then run promotions and account sync cron jobs. Still, only a small fraction of them actually transferred over. Me for example, which should be marked as a tier 7 role, does not have that role at all.
 
Only users who have linked their Discord as an external account will be synced... Also, it says right in the FAQ, that it can't sync server owners.
 
Only users who have linked their Discord as an external account will be synced...

Yes of course I know that.... But there are many with synced accounts, which have not been synced with their tiered role. And yes, those roles are above the other roles (donator etc), but bellow the bot role.
 
Because only ONE account is synced at a time, to prevent getting rate-limited by the Discord API. The cronjob runs every 5 minutes... so it can sync up to 240 accounts in a single day.
 
Because only ONE account is synced at a time, to prevent getting rate-limited by the Discord API. The cronjob runs every 5 minutes... so it can sync up to 240 accounts in a single day.

Ahh... Thanks.

You should put that in the FAQ btw.
 
Started showing errors every ~5 minutes recently, could it be due to a deleted member?

Code:
Error: Call to a member function isMemberOf() on null src/addons/EWR/Discord/Repository/Discord.php:86
Code:
Stack trace
#0 src/addons/EWR/Discord/Repository/Discord.php(218): EWR\Discord\Repository\Discord->patchMember(NULL, Object(EWR\Discord\Entity\UserConnectedAccount))
#1 src/addons/EWR/Discord/Cron/Sync.php(9): EWR\Discord\Repository\Discord->syncDiscord()
#2 [internal function]: EWR\Discord\Cron\Sync::syncDiscord(Array)
#3 src/XF/Admin/Controller/CronEntry.php(112): call_user_func(Array, Array)
#4 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\CronEntry->actionRun(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:CronEntry', 'Run', 'html', Object(XF\Mvc\ParameterBag), 'cronEntries', Object(XF\Admin\Controller\CronEntry), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}

Code:
array(4) {
  ["url"] => string(40) "/community/admin.php?cron/ewrDiscord/run"
  ["referrer"] => string(51) "https://www.sitename.com/community/admin.php?cron/"
  ["_GET"] => array(1) {
    ["cron/ewrDiscord/run"] => string(0) ""
  }
  ["_POST"] => array(1) {
    ["_xfToken"] => string(8) "********"
  }
}


error 2:

Code:
ErrorException: [E_NOTICE] Trying to get property of non-object src/addons/EWR/Discord/Repository/Discord.php:76
Code:
Stack trace
#0 src/addons/EWR/Discord/Repository/Discord.php(76): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/var/www/siten...', 76, Array)
#1 src/addons/EWR/Discord/Repository/Discord.php(218): EWR\Discord\Repository\Discord->patchMember(NULL, Object(EWR\Discord\Entity\UserConnectedAccount))
#2 src/addons/EWR/Discord/Cron/Sync.php(9): EWR\Discord\Repository\Discord->syncDiscord()
#3 [internal function]: EWR\Discord\Cron\Sync::syncDiscord(Array)
#4 src/XF/Admin/Controller/CronEntry.php(112): call_user_func(Array, Array)
#5 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\CronEntry->actionRun(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:CronEntry', 'Run', 'html', Object(XF\Mvc\ParameterBag), 'cronEntries', Object(XF\Admin\Controller\CronEntry), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}

Code:
array(4) {
  ["url"] => string(40) "/community/admin.php?cron/ewrDiscord/run"
  ["referrer"] => string(51) "https://www.sitename.com/community/admin.php?cron/"
  ["_GET"] => array(1) {
    ["cron/ewrDiscord/run"] => string(0) ""
  }
  ["_POST"] => array(1) {
    ["_xfToken"] => string(8) "********"
  }
}
 
Last edited:
I've purchased this add-on a week ago. Where do I get updates, since every time I click on the button in the RM marketplace it keeps asking me to re-buy it?
 
I've purchased this add-on a week ago. Where do I get updates, since every time I click on the button in the RM marketplace it keeps asking me to re-buy it?

You get them to your email address, when there is an update available. You also get 3 chances to download it.
 
Top Bottom