XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Hey, just wondering; What table are the synced accounts tied to?
I'm curious how to delete all associations from the addon as just uninstalling it didn't work.
 
@Jaxel I finally got around to purchasing this app and have it installed.

XENFORO VER: v2.2.13
DISCORD INTEGRATION VER: v2.1.1.9
DID YOU WATCH VIDEO? Yes
DID YOU READ FAQ? Yes

THE GOOD

  • It can post messages from XF to Discord (as the Bot)
  • It can connect to the discord server... BUT then disconnects when I close browser (see THE BAD)
  • It can see all the roles from the DISCORD SERVER no problem (and I will assume it will role sync) so it seems to be working?

THE BAD
  • As mentioned above, it can connect to the Discord server but it goes offline all the time. It doesn't STAY connected unless I click TEST CONNECTION (or HEARTBEAT) from the XF Admin panel. As soon as I close that browser window it goes offline again.
  • It doesn't show the user count in the NAV menu despite it being selected (see IMAGE #1 below)
  • When clicking DISCORD the actual link to the DISCORD SERVER just has my own forums/chat URL (see IMAGE #2 below)
  • Can't disable what I am assuming is the WidgetBot.io on the right side of the page despite it being DISABLED In settings (see IMAGE #2 right side)
  • I received sever errors. Not quite sure what that is all about (see IMAGE #3 below)
    • Maybe this version is outdated and not working for v2.2.13?
  • It also failed to connect my XF account to my DISCORD account via the ACCOUNT PREFERENCES
    • "There is no valid connected account request available. Please try again."

IMAGE #1

1703808858746.webp

IMAGE #2

1703808948569.webp

IMAGE #3

1703817160358.webp
 
Last edited:
Hey @Jaxel

I took it a step further and just purged the plugin and rebuilt everything from scratch.

I documented the process step by step including the end results.

BOT SETTINGS - Redirects are in place.

1703870184018.webp

8WR DISCORD INTEGRATION PLUGIN SETTINGS - Yep, those are there too. Cut and pasted from Discord Development Panel

1703866132906.webp

Now, after all this takes place the BOT logs into the Discord Server with no problem and even pulls the correct data from the Discord Server.
  • All the below information is accurate and from the Discord Server.
  • I moved the bot permission group up to the top of all my groups so that it could manage anything below it (if required)
  • I even gave it full permissions including admin privilages in case that was a thing

1703867113511.webp

I made sure my Xenforo Administrator Group can see Discord options so they have permissions.

1703867587420.webp

The end result is the same. Some features work and others don't and/or cause Xenforo server side errors.

I can post from my forums and it gets posted in DISCORD (so the bot does connect - it isn't a permissions thing there). Here is something I posted in my Announcements Node and the bot placed it in Discord immediately.

1703867658557.webp

So that works.

Post as bot also works (really cool feature btw!!!)

1703868354020.webp

1703868375935.webp

However when I actually try and go to the Discord Server from the site that is where things start to go wrong.

When I click on DISCORD link from my top menu it takes me to the following page where the link that is generated doesn't take me to the discord server that was programmed in the OPTIONS settings for 8WR DISCORD INTEGRATION.

1703870287296.webp

When I try and connect my XF Account to discord (via USER PREFERENCES) I get this?

1703870530262.webp

Also, the Xenforo Server error log still exists. Same as yesterday (Although with a few less errors as I'm not even trying to mess with WidgetBot anymore; I'd rather they just go to the server)


1703870682482.webp

Perhaps a new update to your plugin to work with any and all latest iterative changes of XF as well as Discord? I would also recommend that the instructional video be updated as you are using a very early version of your plugin and there have been a ton of changes since.
 
Last edited:
Can you post the stacktrace to your errors?

Yes sir, I can.

Below are 3 of the errors that were experienced when setting things up with a fresh plugin install for the 3rd time.

1703912863888.webp

NOTE: Line #12 I had to add a space between admin: and option otherwise it gave an emoji like :o

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(1194): XF\Entity\Option->renderDisplayCallback(Array)
#4 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array)
#5 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#7 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l1/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#9 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\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(2487): XF\Mvc\Dispatcher->run()
#17 src/XF.php(524): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state​

array(4) {
["url"] => string(44) "/forums/admin.php?options/groups/EWRdiscord/"
["referrer"] => string(60) "https://www.**********.com/forums/admin.php?options/"
["_GET"] => array(1) {
["options/groups/EWRdiscord/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
Last edited:
Looks like this line is returning "false":
$channels = $discordRepo->getGuild('/channels');

This could happen for one of three reasons.
  1. Server ID is wrong, leading to a 404 error.
  2. Discord is rejecting your cURL request, leading to a 500 error.
  3. You have no controllable channels on your server.
Either way, you would have to DM me admin access to your forum, ftp, and discord account to look into it further.
 
Either way, you would have to DM me admin access to your forum, ftp, and discord account to look into it further.

I spoke with my buddy on this and we've just decided to hard link from XF to the Discord rather than use the feature. We use the Nav option created by this plugin but added our own option as under it. He wasn't comfy with providing an external resource keys to the kingdom as it were :)

As for the errors; not sure it's the first one but the others? who knows.

1. The server ID is correct as the "Post as bot" workks and displays posts in the channel we selected
2. This is a possibility
3. I'm not the server owner but do have full admin rights to the server
 
Hi,
I have most of this working except the app on my xenforo won't load or populate. What am I missing in the setup to make this work? No server logs errors.

Screen Shot 2024-01-14 at 7.03.30 PM.webp
 
Is there no support on this addon? No response here or by email. Maybe I should ask for a refund.
The web based chatroom is based on Widgetbot.io. If you don't have a widgetbot.io channel and cluster set, then the chatroom wont show up.
Hi,
Thanks for getting to m. I'm new to Discord so this is a learning experience.

Which is better to use Crate or html-embed?
 
Is there no support on this addon? No response here or by email. Maybe I should ask for a refund.

Hi,
Thanks for getting to m. I'm new to Discord so this is a learning experience.

Which is better to use Crate or html-embed?
You can use both. Crate is just the chat button that appears on the bottom right of your page. I disable Crate simply because most users find it obnoxious.
 
Hey Jaxel,

The Bot I created does all the posting things fine but role syncing, nick syncing don't seem to working. Is there setting that need to be turned on? I have them checked in my Discod setting in Xenforo.
 
Read the FAQ.
Hi,
Read it again and yes they were out or order. I'm still having issues understanding the e.widgetbot.io and the web app. Usernames don't seem to update to the xenforo usernames. Roles don't seem to be working on the e.widgetbot.io web app either.
 

Attachments

  • Screen Shot 2024-01-19 at 10.16.37 AM.webp
    Screen Shot 2024-01-19 at 10.16.37 AM.webp
    22.6 KB · Views: 7
  • Screen Shot 2024-01-19 at 10.18.06 AM.webp
    Screen Shot 2024-01-19 at 10.18.06 AM.webp
    53.4 KB · Views: 7
  • Screen Shot 2024-01-19 at 12.29.00 PM.webp
    Screen Shot 2024-01-19 at 12.29.00 PM.webp
    47.6 KB · Views: 7
  • Screen Shot 2024-01-19 at 12.29.30 PM.webp
    Screen Shot 2024-01-19 at 12.29.30 PM.webp
    50.8 KB · Views: 7
  • Screen Shot 2024-01-19 at 12.29.57 PM.webp
    Screen Shot 2024-01-19 at 12.29.57 PM.webp
    54 KB · Views: 7
Okay. So if anyone is interested.

So if you edit template: EWRdiscord_index and add username="{$xf.visitor.username}" before the chat size. Your web app will use the site username.You also need to turn on guests on widgetbot
 
Top Bottom