Discord Integration

Discord Integration [Paid] 2.8.5

No permission to buy ($35.00)
Hello, If I buy this addon is it able to post a notification when someone uses the XenForo Media Gallery to post new media?
 
Hello, If I buy this addon is it able to post a notification when someone uses the XenForo Media Gallery to post new media?
AFAIK not out of the box.

There are these 2 options in user preferences:
  • Receive Discord DM when a new alert is received - This will allow you to completely disable receiving Discord DMs for new alerts.
  • Receive Discord DM when a new conversation message is received
Plus, your users have a checkbox for "Discord" (additionally to "Alert" and "Push") for all items under "Receive a notification when someone…"
 
NixFifty updated Discord Integration with a new update entry:

Version 2.7.0

  • Add support for multiple servers that can be used as notification targets.
  • Use a background queue to dispatch Discord notifications to avoid blocking sending alerts and encountering rate limiting.
  • Significant rework of role syncing to be more reliable.
  • Use background queue for role syncing.
  • Add a new option to sync avatars from Discord.
  • Add support for Discord server events to the API wrapper.
  • Add support for Xon's Threadmarks add-on.
  • Fix incorrect function...

Read the rest of this update entry...
 
I get this error which prevents me from installing this latest version:

  • XF\Db\InvalidQueryException: xf_nf_discord_server: MySQL query error [1071]: Specified key was too long; max key length is 767 bytes
  • src/XF/Db/AbstractStatement.php:230
CREATE TABLE IF NOT EXISTS xf_nf_discord_server (
discord_server_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
guild_id VARCHAR(255) NOT NULL,
name VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (discord_server_id),
KEY guild_id (guild_id)
) ENGINE = INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1071, '42000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1071, '42000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/Schema/AbstractDdl.php(158): XF\Db\AbstractAdapter->query('CREATE TABLE IF...')
#4 src/XF/Db/SchemaManager.php(185): XF\Db\Schema\AbstractDdl->apply()
#5 src/addons/NF/Discord/Setup.php(65): XF\Db\SchemaManager->createTable('xf_nf_discord_s...', Object(Closure))
#6 src/addons/NF/Discord/Setup.php(144): NF\Discord\Setup->applySchemaUpdates()
#7 src/XF/AddOn/StepRunnerUpgradeTrait.php(124): NF\Discord\Setup->upgrade2070070Step1(Array)
#8 src/XF/AddOn/StepRunnerUpgradeTrait.php(73): NF\Discord\Setup->upgradeStepRunner(2070070, 1, Array, 2070072)
#9 src/XF/Admin/Controller/AddOn.php(597): NF\Discord\Setup->upgrade(Array)
#10 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\InstallAndUpgrade\XF\Admin\Controller\AddOn), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\InstallAndUpgrade\XF\Admin\Controller\AddOn), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}
array(4) {
["url"] => string(37) "/admin.php?add-ons/NF-Discord/upgrade"
["referrer"] => string(55) "https://mysite.com/admin.php?add-ons/NF-Discord/upgrade"
["_GET"] => array(1) {
["add-ons/NF-Discord/upgrade"] => string(0) ""
}
["_POST"] => array(7) {
["_xfProcessing"] => string(1) "1"
["continue"] => string(1) "1"
["confirm"] => string(1) "1"
["params"] => string(2) "[]"
["count"] => string(1) "1"
["finished"] => string(1) "0"
["_xfToken"] => string(8) "********"
}
}
 
NixFifty updated Discord Integration with a new update entry:

Version 2.7.3

  • Add option for additional servers to be disabled.
  • Add option to kick users based on user group membership.
  • Add option to kick users when they disassociate from Discord.
  • When viewing server details, display current permissions for the bot user to aid troubleshooting.
  • Various improvements to sync process and error handling.

Read the rest of this update entry...
 
  • GuzzleHttp\Exception\ClientException: Client error: PATCH https://discord.com/api/guilds/504730307019276288/members/712439368467480608 resulted in a 403 Forbidden response: {"message": "Missing Permissions", "code": 50013}
  • src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
#0 src/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 src/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 src/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 src/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 src/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 src/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Promise\Promise->wait()
#10 src/addons/NF/Discord/Api.php(896): GuzzleHttp\Client->request('PATCH', 'https://discord...', Array)
#11 src/addons/NF/Discord/Api.php(1010): NF\Discord\Api->request(Array, 'guilds/50473030...', Array)
#12 src/addons/NF/Discord/Api.php(325): NF\Discord\Api->patch('guilds/:guildId...', Array)
#13 src/addons/NF/Discord/ApiMessage/SyncUser.php(211): NF\Discord\Api->patchGuildMemberRoles('712439368467480...', Array)
#14 src/addons/NF/Discord/ApiMessage/SyncUser.php(139): NF\Discord\ApiMessage\SyncUser->syncRoles(Object(SV\ElasticSearchEssentials\XF\Entity\User), '712439368467480...')
#15 src/addons/NF/Discord/Repository/Queue.php(236): NF\Discord\ApiMessage\SyncUser->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 src/XF/Cli/Command/RunJobs.php(59): XF\Job\Manager->runQueue(false, 8)
#21 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\RunJobs->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 src/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\RunJobs), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 src/XF/Cli/Runner.php(111): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 cmd.php(15): XF\Cli\Runner->run()
#27 {main}


This started after 2.7.3
 
@estranged this means the bot doesn't have permissions to update roles for a user.

Either disable role/permission sync, or ensure the bot has the manage role permission and drag the bot's own role to the top of the role list. It is also possible it is trying to touch the server owner which doesn't work.
 
When this addon is disabled, I get this on node creation:

Code:
MySQL query error [1364]: Field 'nf_discord_threadmarks_category_ids' doesn't have a default value

plus, this one on uninstall:

Code:
LogicException: xf_nf_discord_queue: Unknown schema DDL type XF\Db\Schema\Drop src/addons/SV/StandardLib/InstallerHelper.php:420
Generated by: admin 25.5.2022 at 02:34
Stack trace
#0 src/addons/NF/Discord/Setup.php(289): NF\Discord\Setup->addOrChangeColumn(Object(XF\Db\Schema\Drop), 'queue_id', 'int')
#1 src/XF/Db/SchemaManager.php(205): NF\Discord\Setup->NF\Discord\{closure}(Object(XF\Db\Schema\Drop))
#2 src/addons/NF/Discord/Setup.php(252): XF\Db\SchemaManager->dropTable('xf_nf_discord_q...', Object(Closure))
#3 src/XF/AddOn/StepRunnerUninstallTrait.php(61): NF\Discord\Setup->uninstallStep1(Array)
#4 src/XF/AddOn/StepRunnerUninstallTrait.php(28): NF\Discord\Setup->uninstallStepRunner(1, Array)
#5 src/XF/Admin/Controller/AddOn.php(657): NF\Discord\Setup->uninstall(Array)
#6 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AddOn->actionUninstall(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Uninstall', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#11 src/XF.php(517): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(39) "/admin.php?add-ons/NF-Discord/uninstall"
  ["referrer"] => string(56) "https://xf22.test/admin.php?add-ons/NF-Discord/uninstall"
  ["_GET"] => array(1) {
    ["add-ons/NF-Discord/uninstall"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["_xfProcessing"] => string(1) "1"
    ["continue"] => string(1) "1"
    ["confirm"] => string(1) "1"
    ["params"] => string(2) "[]"
    ["count"] => string(1) "1"
    ["finished"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
  }
}
 
Last edited:
Does this, or will it, support ban sync? If someone gets banned on either forum or discord, they'd get banned on other?
 
NixFifty updated Discord Integration with a new update entry:

Version 2.7.4

  • Add widget to display current number of online users in a specified Discord server.
  • Minor improvements and cleanup for syncing.
  • Improve PHP 8.1 compatibility when all Discord servers have been disabled.
  • Track account being connected to Discord within user change log.
  • Fix error during upgrade when no valid Discord servers are setup.
  • Fix bad default for xf_forum table when add-on is disabled.
  • Fix uninstaller.

Read the rest of this update entry...
 
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
 
when user wants to associate their accounts with discord, an error occured that someone has already linked his discord with an account
Does this happen with all accounts? If it is an occasional problem, it might be normal behavior: Given forum user A wants to connect their Discord account and uses on Discord the email address of forum user B, then this error occurs. Keep in mind, that email-addresses on XF and Discord may differ (for the same user).
 
Does this happen with all accounts? If it is an occasional problem, it might be normal behavior: Given forum user A wants to connect their Discord account and uses on Discord the email address of forum user B, then this error occurs. Keep in mind, that email-addresses on XF and Discord may differ (for the same user).
No, it's not that case. I recently installed this plugin from @NixFifty and before that there were already entries from a discord plugin before (8WR Discord for XF 1.x) and I guess this makes this trouble.
 
Top Bottom