Discord Integration

Discord Integration [Paid] 2.8.5

No permission to buy ($35.00)
Does this have any trademarks in the plugin or are they already removed / never placed..?
There is the Discord logo for the widget, but Discord's logo is also part of the most recent font-awesome set and its use as part of the Discord widget should be entirely above board.
 
NixFifty updated Discord Integration with a new update entry:

Version 2.7.7

  • If a DM from the site to a user fails due to a lack of permissions, 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.

Read the rest of this update entry...
 
Ah, okay. Thanks for replying. Wish it was, it's a feature I've been waiting a long time for. Hopefully it'll be one.
 
Since the Update to 2.7.7 I got these errors every second:

Code:
GuzzleHttp\Exception\ClientException: Discord Msg: 1206; Client error: `POST https://discord.com/api/channels/982736063300796526/messages` resulted in a `400 Bad Request` response: {"embeds": ["0"]} src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Stack-Trace
#0 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Client.php(182): GuzzleHttp\Promise\Promise->wait()
#10 src/addons/NF/Discord/Api.php(1001): GuzzleHttp\Client->request('POST', 'https://discord...', Array)
#11 src/addons/NF/Discord/Api.php(654): NF\Discord\Api->request(Array, 'channels/982736...', Array)
#12 src/addons/NF/Discord/ApiMessage/MessageToUserDM.php(54): NF\Discord\Api->createMessage('982736063300796...', '', Array)
#13 src/addons/NF/Discord/ApiMessage/AbstractApiMessage.php(120): NF\Discord\ApiMessage\MessageToUserDM->NF\Discord\ApiMessage\{closure}()
#14 src/addons/NF/Discord/ApiMessage/MessageToUserDM.php(74): NF\Discord\ApiMessage\AbstractApiMessage->withApiThrow(Object(Closure))
#15 src/addons/NF/Discord/Repository/Queue.php(243): NF\Discord\ApiMessage\MessageToUserDM->dispatch()
#16 src/addons/NF/Discord/Job/DiscordSendQueue.php(22): NF\Discord\Repository\Queue->run(8)
#17 src/XF/Job/Manager.php(260): NF\Discord\Job\DiscordSendQueue->run(8)
#18 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#19 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#20 job.php(43): XF\Job\Manager->runQueue(false, 8)
#21 {main}

Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(39) "https://url/title/user.id/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Since the Update to 2.7.7 I got these errors every second:

Code:
GuzzleHttp\Exception\ClientException: Discord Msg: 1206; Client error: `POST https://discord.com/api/channels/982736063300796526/messages` resulted in a `400 Bad Request` response: {"embeds": ["0"]} src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Stack-Trace
#0 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Client.php(182): GuzzleHttp\Promise\Promise->wait()
#10 src/addons/NF/Discord/Api.php(1001): GuzzleHttp\Client->request('POST', 'https://discord...', Array)
#11 src/addons/NF/Discord/Api.php(654): NF\Discord\Api->request(Array, 'channels/982736...', Array)
#12 src/addons/NF/Discord/ApiMessage/MessageToUserDM.php(54): NF\Discord\Api->createMessage('982736063300796...', '', Array)
#13 src/addons/NF/Discord/ApiMessage/AbstractApiMessage.php(120): NF\Discord\ApiMessage\MessageToUserDM->NF\Discord\ApiMessage\{closure}()
#14 src/addons/NF/Discord/ApiMessage/MessageToUserDM.php(74): NF\Discord\ApiMessage\AbstractApiMessage->withApiThrow(Object(Closure))
#15 src/addons/NF/Discord/Repository/Queue.php(243): NF\Discord\ApiMessage\MessageToUserDM->dispatch()
#16 src/addons/NF/Discord/Job/DiscordSendQueue.php(22): NF\Discord\Repository\Queue->run(8)
#17 src/XF/Job/Manager.php(260): NF\Discord\Job\DiscordSendQueue->run(8)
#18 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#19 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#20 job.php(43): XF\Job\Manager->runQueue(false, 8)
#21 {main}

Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(39) "https://url/title/user.id/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Thanks, I'll check this out.
@NixFifty Could you verify if this is the intended behavior?
This is intended, yeah. Perhaps the option could do with some better wording but since syncing in general happens regularly, it's supposed to imply that the username will also be kept in sync. Are you not wanting that behaviour?
 
This is intended, yeah. Perhaps the option could do with some better wording but since syncing in general happens regularly, it's supposed to imply that the username will also be kept in sync. Are you not wanting that behaviour?
In our case, it would be better if username syncing happens only once. On our Discord, we add a clantag manually to some users which gets overwritten everytime the user gets synced with XenForo.
Would it be possible to sync usernames only if there is actually a username change?
 
We use SSO for access to the forums, but when members attempt to sync their discord account with the forums it asks for their forum password, which doesn't exist. Is there a way to bypass this?
 
I understand that it's possible to sync from xenforo to discord (role) but how about syncing from discord to xenforo? So based on user's discord role they are given specific xenforo usergroup...
 
In our case, it would be better if username syncing happens only once. On our Discord, we add a clantag manually to some users which gets overwritten everytime the user gets synced with XenForo.
Would it be possible to sync usernames only if there is actually a username change?
I'll note it down and look in to it for a future version.
We use SSO for access to the forums, but when members attempt to sync their discord account with the forums it asks for their forum password, which doesn't exist. Is there a way to bypass this?
The password requirement is something core XenForo is doing. Depending on how your SSO setup works, you might want to write / use a separate add-on to bypass that as it's a little out of scope for this one.
Thanks, I've added this to the resource.
I understand that it's possible to sync from xenforo to discord (role) but how about syncing from discord to xenforo? So based on user's discord role they are given specific xenforo usergroup...
At the moment, it's just XenForo to Discord.
 
Hey @NixFifty,

I see that this add-on supports automatic cross-posting of forum threads to Discord:
  • 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.
I was curious as to whether your add-on supports the new forum channel type within Discord for this, as many of my server's channels have been converted to the forum type since their rollout a while ago.

EDIT: Whoops, I must not have been on the most recent page given this update. Does 'initial' support come with any limitations, though? Has anyone implemented this functionality successfully on their own forum + Discord server? Thanks!
 
Hey @NixFifty,

I see that this add-on supports automatic cross-posting of forum threads to Discord:
  • 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.
I was curious as to whether your add-on supports the new forum channel type within Discord for this, as many of my server's channels have been converted to the forum type since their rollout a while ago.

EDIT: Whoops, I must not have been on the most recent page given this update. Does 'initial' support come with any limitations, though? Has anyone implemented this functionality successfully on their own forum + Discord server? Thanks!
Yes, forum channels are supported. New threads and replies (if opted in) on XenForo become new threads on Discord. There's room for expansion and additional integration though, hence the use of "initial". For example, new replies to threads on XenForo should probably go to the corresponding thread on Discord but this isn't the case right now.
 
Yes, forum channels are supported. New threads and replies (if opted in) on XenForo become new threads on Discord. There's room for expansion and additional integration though, hence the use of "initial". For example, new replies to threads on XenForo should probably go to the corresponding thread on Discord but this isn't the case right now.
Thanks so much for the expeditious reply! XF threads -> Discord threads is exactly what I am interested in. Syncing XF replies with Discord threads is an interesting use case, though I think it wold have to be bi-directional if the threads in either system were simple conversations, else the XF replies would ignore the context of Discord ones.

I used 8WR Discord for xenforo 1.5 and now using yours for the latest XF. Well, there is already entries in the database from the plugin before and now, when user wants to associate their accounts with discord, an error occured that someone has already linked his discord with an account. How can I solve this problem?
Btw. in the "extra_data" column in the xf_user_connected_account table is just a json entry with a token for new linked accounts and for the old ones there are much more entries. @NixFifty
I would be similarly migrating from the current version of 8WR Discord to this add-on; as I am using XF Cloud, I would not be able to query the database and cleanup the remnants of that add-on beyond what it does automatically. Unsure if that makes changing over a non-starter (the forum is still being built but I have already configured and created connected test accounts for 8WR), but I'm quite keen to be able to cross-post XF threads into Discord forum channel threads...
 
Is it possible to just use this plugin to do Discord connected accounts authentication without doing any role / thread syncing?

Having now installed and played around with it, yes - by default it doesn't sync either of those, so you can just leave them unconfigured.

@NixFifty I was curious as to what phrases (if any) would let me modify these:
Screenshot 2022-11-17 at 20.35.20.webp
As well, is it possible to either eliminate the truncation of the content, or modify how many words/characters it truncates by?
 
Top Bottom