XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Did you change the roles list order on your server? You can try re-installing the bot by deleting your server ID.
Ok, thanks. Deleted the server ID, uninstalled, reinstalled and trying to connect and getting this error now:



I went through the bot setup video again to make sure I did everything correctly on the bot side and everything seems in order.
 

Attachments

  • 1608137370676.webp
    1608137370676.webp
    15.1 KB · Views: 42
Last edited:
Ok, thanks. Deleted the server ID, uninstalled, reinstalled and trying to connect and getting this error now:



I went through the bot setup video again to make sure I did everything correctly on the bot side and everything seems in order.
I have discovered the problem and I am amazed this ever worked :) Sorry for these posts - we had the wrong server IP links in the redirects and forgot to update them when we updated the server - sorry.
 
Hello

I have a problem displaying the chat on the forum the same as on your current site
 

Attachments

  • Capture_discord.webp
    Capture_discord.webp
    87.7 KB · Views: 33
Hello

I have a problem displaying the chat on the forum the same as on your current site

Trace de la pile​

#0 [internal function]: XF\Template\Templater->handleTemplateError(2, '[E_WARNING] uso...', '/home/rk30365-o...', 329, Array)
#1 src/addons/EWR/Discord/Repository/Discord.php(329): usort(false, Object(Closure))
#2 src/addons/EWR/Discord/Option/Channels.php(13): EWR\Discord\Repository\Discord->parseChannels(false)
#3 [internal function]: EWR\Discord\Option\Channels::renderOption(Object(XF\Entity\Option), Array)
#4 src/XF/Entity/Option.php(77): call_user_func(Array, Object(XF\Entity\Option), Array)
#5 [internal function]: XF\Entity\Option->renderDisplayCallback(Array)
#6 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#7 internal_data/code_cache/templates/l3/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array)
#8 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#9 internal_data/code_cache/templates/l3/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#10 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#11 internal_data/code_cache/templates/l3/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#12 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#13 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#14 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#15 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#16 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#19 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#20 src/XF.php(488): XF\App->run()
#21 admin.php(13): XF::runApp('XF\\Admin\\App')
#22 {main}

État de la demande​

array(4) {
["url"] => string(37) "/admin.php?options/groups/EWRdiscord/"
["referrer"] => string(55) "https://teamkit.fr/admin.php?options/groups/EWRdiscord/"
["_GET"] => array(1) {
["options/groups/EWRdiscord/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 

Attachments

  • Capture_discord.webp
    Capture_discord.webp
    87.7 KB · Views: 32
Hi, we use this plugin in a solely Discord > XenForo relationship.

Would it be possible to add an option to sync nicknames in reverse to what’s available now? I’d like to change a XenForo username to match a Discord user’s nickname (not username).

Thanks
 
Is it possible to allow for instant sync with the plugin, this would be a thing for perhaps a small community that doesn't have account changes that often but needs to be done with some haste?
 
Hi @Jaxel

Trying to install this for someone, but when I go through the Authorization steps to link to a guild, it should return to the ACP after authorizing, correct? Instead, I'm getting thrown to an Oops! This forum cannot be found! error...I know I'm overlooking something stupid, but can't quite see what it is. Any possible ideas as to what I've overlooked?

(It doesn't actually add the bot to the guild in acp, so the authorization seems to work on the discord side, but not on the xf side of things)

Edit -- the URL it tries to send me back to is (redacted):

Code:
https://[domain].com/forums/connected_discord.php?code=FiYrlNWvB4AVrdpapGxnKxbIVNKKv7&guild_id=[numbers]&permissions=8
 
Last edited:
Why am I getting this error?
pLC8kn3.png
yQqv9jq.png

Getting this too, Widget is working on Discord, and enabled. Loading the json url itself is a 401 from xenforo.
1614298311003.webp
But copying widget from discord,
1614298398552.webp


Is it related to new options not shown in the video?
1614298230480.webp

It now says "Please select at least one OAuth2 scope" so wondering is this is a new thing they've added? The old bot worked fine but we're started a new group so uninstalled the old one. Now it won't connect and spams the error log.

That url looks like,
https://discord.com/api/oauth2/authorize?client_id=removed&permissions=0&redirect_uri=https%3A%2F%2Fwww.removed.com%2Fconnected_discord.php&response_type=code&scope=identify%20email%20connections%20guilds%20guilds.join%20gdm.join%20rpc%20applications.commands%20applications.builds.read%20applications.builds.upload%20messages.read%20webhook.incoming%20bot%20rpc.notifications.read%20applications.commands.update%20applications.store.update%20applications.entitlements%20activities.read%20activities.write%20relationships.read
 
Getting this too, Widget is working on Discord, and enabled. Loading the json url itself is a 401 from xenforo.
View attachment 247405
But copying widget from discord,
View attachment 247406


Is it related to new options not shown in the video?
View attachment 247404

It now says "Please select at least one OAuth2 scope" so wondering is this is a new thing they've added? The old bot worked fine but we're started a new group so uninstalled the old one. Now it won't connect and spams the error log.

That url looks like,
https://discord.com/api/oauth2/authorize?client_id=removed&permissions=0&redirect_uri=https%3A%2F%2Fwww.removed.com%2Fconnected_discord.php&response_type=code&scope=identify%20email%20connections%20guilds%20guilds.join%20gdm.join%20rpc%20applications.commands%20applications.builds.read%20applications.builds.upload%20messages.read%20webhook.incoming%20bot%20rpc.notifications.read%20applications.commands.update%20applications.store.update%20applications.entitlements%20activities.read%20activities.write%20relationships.read

Try Connected Accounts for Select Redirect instead of Discord
 
Try Connected Accounts for Select Redirect instead of Discord
I did both, as before when it worked but it no longer connects. Oddly, connecting via oauth works.
1614356668681.png
1614356695436.png
This addon doesn't need any scopes from Discord.
I've done everything as your video says. It still errors. The options screen has changed on Discord compared to your video but I've done everything as before.
1614356795010.png
It even says connected here. But the error logs are spammed with 403's

It says "missing access" but all auth options are enabled,
  • XF\PrintableException: An error occurred while connecting with Discord. Please try again later.: Client error: GET https://discord.com/api/guilds/removed/members/removed?limit=1000 resulted in a 403 Forbidden response: {"message": "Missing Access", "code": 50001}
  • src/addons/EWR/Discord/Repository/Discord.php:60
But the Widget etc is public. I can browse it and view all user / server info via the api.

General Information on Discord now lists a public key, is this needed? As there's nowhere to put and I've tried this and the bots key.

OAuth2 has both connected_discord.php and connected_account.php set. (in image I've tried both) It says "please select at least one OAuth2 scope" then gives the url.
1614357008988.png


OAuth2 alone works, it's just the connection which says connected but results in a 403 so wondering if they've made backend changes?

EDIT: Just tried a totally different account with a seperate discord server, the exact issue happens again. I think Discord has changed something their side which is breaking. OAuth2 works, Bot can be added/connection works but it 403's and spams the error logs.
 
Last edited:
Can you post the actual error? And not just the stack trace?
It gives three sets of errors, I've replaced sessions/guids with the word removed. I've tested the Widget manually, it does work and I'm unsure what is the issue. It simply says 403 forbidden on all but manually loading the widgets json shows it fine. Even logged out. I put each one in a spoiler due to amount of text.

In the errors it mentions Xons SV library, I then tried with all addons disabled incase of conflict but the same 403 error is shown. the client id, client secret and bot key are all correct, no spaces/miscopied text. I've tried with all urls.

I've tried two seperate discord channels/via two accounts.

XF\PrintableException: Macro admin:option_macros :: option_row() error: An error occurred while connecting with Discord. Please try again later.: Client error: `GET https://discord.com/api/guilds/removed/channels?limit=1000` resulted in a `403 Forbidden` response: {"message": "Missing Access", "code": 50001} src/addons/EWR/Discord/Repository/Discord.php:60 Generated by: WD Feb 26, 2021 at 4:57 PM

Stack Trace #0 src/addons/EWR/Discord/Option/WidgetBot.php(12): EWR\Discord\Repository\Discord->getGuild('/channels') #1 [internal function]: EWR\Discord\Option\WidgetBot::renderOption(Object(XF\Entity\Option), Array) #2 src/XF/Entity/Option.php(77): call_user_func(Array, Object(XF\Entity\Option), Array) #3 [internal function]: XF\Entity\Option->renderDisplayCallback(Array) #4 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array) #5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array) #6 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array) #8 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array) #10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array) #12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render() #13 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array) #14 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #15 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #16 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') #17 src/XF/App.php(2326): XF\Mvc\Dispatcher->run() #18 src/XF.php(488): XF\App->run() #19 admin.php(13): XF::runApp('XF\\Admin\\App') #20 {main}

Request State array(4) { ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/" ["referrer"] => string(181) "https://discord.com/oauth2/authorize?client_id=removed&response_type=code&scope=bot&permissions=8&redirect_uri=https%3A%2F%2Fwww.removed.com%2Fconnected_discord.php" ["_GET"] => array(1) { ["options/groups/EWRdiscord/"] => string(0) "" } ["_POST"] => array(0) { } }

XF\PrintableException: Macro admin:option_macros :: option_row() error: An error occurred while connecting with Discord. Please try again later.: Client error: `GET https://discord.com/api/guilds/removed/roles?limit=1000` resulted in a `403 Forbidden` response: {"message": "Missing Access", "code": 50001} src/addons/EWR/Discord/Repository/Discord.php:60 Generated by: WD Feb 26, 2021 at 4:57 PM

Stack trace #0 src/addons/EWR/Discord/Option/Roles.php(12): EWR\Discord\Repository\Discord->getGuild('/roles') #1 [internal function]: EWR\Discord\Option\Roles::renderOption(Object(XF\Entity\Option), Array) #2 src/XF/Entity/Option.php(77): call_user_func(Array, Object(XF\Entity\Option), Array) #3 [internal function]: XF\Entity\Option->renderDisplayCallback(Array) #4 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array) #5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array) #6 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array) #8 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array) #10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array) #12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render() #13 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array) #14 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #15 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #16 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') #17 src/XF/App.php(2326): XF\Mvc\Dispatcher->run() #18 src/XF.php(488): XF\App->run() #19 admin.php(13): XF::runApp('XF\\Admin\\App') #20 {main}

Request state array(4) { ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/" ["referrer"] => string(181) "https://discord.com/oauth2/authorize?client_id=removed&response_type=code&scope=bot&permissions=8&redirect_uri=https%3A%2F%2Fwww.removed.com%2Fconnected_discord.php" ["_GET"] => array(1) { ["options/groups/EWRdiscord/"] => string(0) "" } ["_POST"] => array(0) { } }

XF\PrintableException: Macro admin:option_macros :: option_row() error: An error occurred while connecting with Discord. Please try again later.: Client error: `GET https://discord.com/api/guilds/removed/channels?limit=1000` resulted in a `403 Forbidden` response: {"message": "Missing Access", "code": 50001} src/addons/EWR/Discord/Repository/Discord.php:60 Generated by: WD Feb 26, 2021 at 4:57 PM

Stack trace #0 src/addons/EWR/Discord/Option/Channels.php(12): EWR\Discord\Repository\Discord->getGuild('/channels') #1 [internal function]: EWR\Discord\Option\Channels::renderOption(Object(XF\Entity\Option), Array) #2 src/XF/Entity/Option.php(77): call_user_func(Array, Object(XF\Entity\Option), Array) #3 [internal function]: XF\Entity\Option->renderDisplayCallback(Array) #4 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array) #5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array) #6 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array) #8 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array) #10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL) #11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array) #12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render() #13 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array) #14 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #15 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #16 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') #17 src/XF/App.php(2326): XF\Mvc\Dispatcher->run() #18 src/XF.php(488): XF\App->run() #19 admin.php(13): XF::runApp('XF\\Admin\\App') #20 {main}

Request state array(4) { ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/" ["referrer"] => string(181) "https://discord.com/oauth2/authorize?client_id=removed&response_type=code&scope=bot&permissions=8&redirect_uri=https%3A%2F%2Fwww.removed.com%2Fconnected_discord.php" ["_GET"] => array(1) { ["options/groups/EWRdiscord/"] => string(0) "" } ["_POST"] => array(0) { } }
 
Hi @Jaxel

Trying to install this for someone, but when I go through the Authorization steps to link to a guild, it should return to the ACP after authorizing, correct? Instead, I'm getting thrown to an Oops! This forum cannot be found! error...I know I'm overlooking something stupid, but can't quite see what it is. Any possible ideas as to what I've overlooked?

(It doesn't actually add the bot to the guild in acp, so the authorization seems to work on the discord side, but not on the xf side of things)

Edit -- the URL it tries to send me back to is (redacted):

Code:
https://[domain].com/forums/connected_discord.php?code=FiYrlNWvB4AVrdpapGxnKxbIVNKKv7&guild_id=[numbers]&permissions=8
Sorry to be a pest, but can I get any sort of insights into this one? Like I said, likely something dumb I've overlooked, but would appreciate the help!

Edit -- yep, overlooked a dumb...
 
Last edited:
Your URL is probably wrong.

admin.php?options/groups/basicBoard/

Basic Board URL is wrong. Fix it, and start over.
 
Top Bottom