XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
When a new moderated resource is posted / updated, it still posts to discord. Users can't view it because it's still in moderation. Can we withhold discord posting until a moderator approves the resource?
 
Any idea what this means? Would really help

Code:
Server error log
XF\PrintableException: An error occurred while connecting with Discord. Please try again later.: Client error: [ICODE]GET https://discord.com/api/guilds/774003652284383242/members/293078258793054209?limit=1000[/ICODE] resulted in a [ICODE]403 Forbidden[/ICODE] response: {"message": "Missing Access", "code": 50001}
src/addons/EWR/Discord/Repository/Discord.php:60
Generated by: Unknown account
Mar 19, 2022 at 5:59 PM

Stack trace
#0 src/addons/EWR/Discord/Repository/Discord.php(78): EWR\Discord\Repository\Discord->getGuild('/members/293078...')
#1 src/addons/EWR/Discord/Repository/Discord.php(288): EWR\Discord\Repository\Discord->patchMember(Object(Snog\Forms\XF\Entity\User), Object(EWR\Discord\Entity\UserConnectedAccount))
#2 src/addons/EWR/Discord/Cron/Sync.php(9): EWR\Discord\Repository\Discord->syncDiscord()
#3 src/XF/Job/Cron.php(37): EWR\Discord\Cron\Sync::syncDiscord(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#7 job.php(43): XF\Job\Manager->runQueue(false, 8)
#8 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(62) "https://forum.cadojrp.com/threads/ryzes-staff-application.141/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Fixed it forums and discord were out of sync.

Any idea why users get this below when they already have an account registered after they login via Discord in the first place.
Code:
This account's email is already associated with another member. Please log into that account to associate this account
 
Their Discord is already associated with another member.
Yet it isn’t. That’s never the case lol The forum had 17 members. How can one user’s discord become associated with another members profile on the forum. Is that something that happens by design with the Addon because I don’t understand how the message pops up when there are 2 different users in question.

One user automatically gets linked to the other or something lmfao not sure if I get the add on I understand it’s purpose but it’s functionality not one bit when it comes to getting that message.

On my forum I only allow users to login via discord using this add-on so there’s no way they could’ve “associated” another users discord account under their profile.

Help me understand the process in that.

Because there hasn’t been any report that someone has done that.

Each time that it happens the user that is in question when receiving that error their discord becomes unlinked from their profile. BUT the problem is not someone else linking that users discord to their profile as they already have theirs on their profile lol
 
Yet it isn’t. That’s never the case lol The forum had 17 members. How can one user’s discord become associated with another members profile on the forum. Is that something that happens by design with the Addon because I don’t understand how the message pops up when there are 2 different users in question.

One user automatically gets linked to the other or something lmfao not sure if I get the add on I understand it’s purpose but it’s functionality not one bit when it comes to getting that message.

On my forum I only allow users to login via discord using this add-on so there’s no way they could’ve “associated” another users discord account under their profile.

Help me understand the process in that.

Because there hasn’t been any report that someone has done that.

Each time that it happens the user that is in question when receiving that error their discord becomes unlinked from their profile. BUT the problem is not someone else linking that users discord to their profile as they already have theirs on their profile lol
Honestly it could be that there is only 10 users on the forum registered all of the accounts have their correct discord accounts associated to their profiles.

One user isn’t on the site for 2 days (Member count still 10) user goes to login via discord. BOOM the account receives message that their discord is associated elsewhere while the 9 other accounts STILL have their correct discord accounts on their profile

Not here to give anyone a hard time I paid for something and am simply requesting help on a purchased item.

Having this issue on my forum don’t get any error messages when it happens not entirely possible that associated discord accounts just swap forum users out of nowhere.
 
Discord enforced email verification. When you login with Discord, it reinforces that verification. If you are trying to link a forum user to a discord user, and the email that belongs to that discord account, belongs to a DIFFERENT forum user (though not necessarily a different discord user), you will get that error.
 
All is well I’ll probably use the add-on for different reasons and not enforcing the whole login with discord feature as it functions funny lol how did my email end up on another forum account lol In the matter of a few days when before it was just fine makes no sense
 
Discord enforced email verification. When you login with Discord, it reinforces that verification. If you are trying to link a forum user to a discord user, and the email that belongs to that discord account, belongs to a DIFFERENT forum user (though not necessarily a different discord user), you will get that error.
I mean I’ve checked plenty of times because it occurs every few users it’ll literally be a new forum user and they’d get that error a few days or hours after they register.


It’s just weird to me how that works I guess I’ll get over it. I’ve just been deleting their account as a whole and reapplying their new account to their old posts and allowing them re-associate their discord to their account
 
Hmm... well I just did a code search on the error. And it's not actually from Discord. It's part of the XenForo core... not even a part of this specific addon, but XenForo itself. This is the relevant code:

Code:
// We know the account isn't associated, but if its email matches someone else, we can't continue.
// (If it matches our current account, we just disregard it.)
if ($providerData->email)
{
    $emailUser = $this->em()->findOne('XF:User', ['email' => $providerData->email]);
    if ($emailUser && $emailUser->user_id != $visitor->user_id)
    {
        return $this->error(\XF::phrase('this_accounts_email_is_already_associated_with_another_member'));
    }
}

This code specifically says that the email from the provider (Discord account) is matching an existing XF:User (forum account). As I said before.
 
Hmm... well I just did a code search on the error. And it's not actually from Discord. It's part of the XenForo core... not even a part of this specific addon, but XenForo itself. This is the relevant code:

Code:
// We know the account isn't associated, but if its email matches someone else, we can't continue.
// (If it matches our current account, we just disregard it.)
if ($providerData->email)
{
    $emailUser = $this->em()->findOne('XF:User', ['email' => $providerData->email]);
    if ($emailUser && $emailUser->user_id != $visitor->user_id)
    {
        return $this->error(\XF::phrase('this_accounts_email_is_already_associated_with_another_member'));
    }
}

This code specifically says that the email from the provider (Discord account) is matching an existing XF:User (forum account). As I said before.

Gotcha! Also like I said above I’ll just use it for other purposes. :)

No issue with that!

Just found it weird how an email matches another account when it doesn’t as the emails on every other account is nothing like the one that would’ve been in question.

Went into my messaging thinking it was the add-on found out it wasn’t all is well bud!
 
I find that Discord produces a lot of errors in the first place. It's not as bad as Twitch, but it's still pretty bad. Their API is constantly going down. Every few days, it will go down for a few hours and spam my error logs with connection failures. I honestly would not use Discord to enforce registrations on a production site.
 
I find that Discord produces a lot of errors in the first place. It's not as bad as Twitch, but it's still pretty bad. Their API is constantly going down. Every few days, it will go down for a few hours and spam my error logs with connection failures. I honestly would not use Discord to enforce registrations on a production site.


Yeah see there we go that could just be it. I figured we’d survive with it only being just a few hundred folks on their but really when there was the site only had a good 30-50 active members so I saw it as no biggie doing it how I did it.

But yes that sounds a bit right just the thought I discord integration is what led me here lol.

But from here on out I’ll go in and tweak a few things and we’ll move the site in a different direction!

Thank you user!
 
Hi is there away for us to send DMs from xenforo to discord Via the plugin? so if i comment on a tread the bot will send my a DM in xenforo and in discord
 
Back
Top Bottom