XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
I am able yo give just once channel permission?

View attachment 225698

Where can i define the permission for the channels

I believe they are referring to the bot added to your Discord server - you need to make sure in the Discord server that the bot has adequate permissions for the channels.

Our forum is currently on 2.1.0.9, in part because an update a while ago had some language stating that, post-update, all forum users would have to re-link their Discord account. Given how disruptive that would be, we deferred updating. Upon checking back in with this add-on I see that there has been a healthy number of updates, but that this warning is no longer present. At this point the only evidence of that issue/warning is in this post – the Changelog no longer contains any mention of this need for re-linking.

If we are to update to the latest version now, will users still be required to perform that re-linking? Or does the removal of that warning reflect that the need to re-link has been remedied/avoided with subsequent updates?

@Jaxel A reply to this would be nice as well, I would think this is an easy "yes" or "no". I can't update an add-on and not know if there will be an impact like that on my users.
 

ozgr

Active member
I believe they are referring to the bot added to your Discord server - you need to make sure in the Discord server that the bot has adequate permissions for the channels.

Sorry for my stupid questions but i didn't understand this part.
Could please explain mor in details, maybe with some examples. The WidgetBot has follwing roles:

1590245414488.png

I have also a the Bot which i have create during the setup process. It does have admin permission (as it should be):

1590245659586.png

which was create in discord dev portal:
1590246213668.png

1590246280399.png

1590246435315.png

1590246551333.png

And how about those settings :

1590246628987.png
here are again the Settings of the Addon:
1590245935585.png

1590246004886.png

Here is the app

So what i am doing wrong, i am realy confused with that config stuff !?
 
Last edited:

Luehrsen

Member
@Jaxel First of all, thanks for the amazing work! I really enjoyed the implementation. This is the second time now I've had contact with this plugin. (First time as a user, now as an admin.)

I've read the code a bit, so I have some questions about how things work, if you don't mind.

In the UserConnectedAccount.php Entity I've seen that patchMember runs in the _preSave hook. From that I assume, that a good fix for "stuff not syncing" is to remove the Discord connetion and reconnect. Does that make sense? (But I have my suspisions, that this hook is not firing, as syncing nick/roles often takes several minutes after the user joined. So I assume it's the cron doing the work, not the _preSave hook. Edit: Nope, I'm stupid. I've let my users join after they made the connection. But then the bot has nothing to update. So the user should join the discord server BEFORE making the connection.)

In the Discord.php Repository on line 279 I've seen, that you query one user ordered by last syncdate and with a cutoff date. This limits the maximum of updated users per day to 1440, or 1 per minute. (On an active board, as you've stated multiple times.)

Is it maybe possible to add batching to that request (if the Discord API supports that), or to add a multiplier, that not just one user get's queried and updated, but n per cron tick (where n is an option updatable by the user, defaulting to 1). I have read that you do this to avoid getting rate limited by the discord api. But the discord api doc states, that the rate limit is somewhere at 10000 requests per 10 minutes, which is 1440000 requests per day. Or about 1000 times more than you currently limit it to. (https://github.com/discord/discord-...s/topics/Rate_Limits.md#invalid-request-limit)

Again, thanks a lot!
 
Last edited:

Alan_SP

Active member
But the discord api doc states, that the rate limit is somewhere at 10000 requests per 10 minutes, which is 1440000 requests per day. Or about 1000 times more than you currently limit it to.
Actually, they say something different:

Because we may change rate limits at any time and rate limits can be different per application, rate limits should not be hard coded into your bot/application. In order to properly support our dynamic rate limits, your bot/application should parse for our rate limits in response headers and locally prevent exceeding the limits as they change.

You refer to:

Invalid Request Limit
IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes. An invalid request is one that results in 401, 403, or 429 statuses.

Basically, addon should see what limit there actually is (as it can change over time or over what addon actually tries to do) and apply limits accordingly.
 

Jaxel

Well-known member
Every sync requires three cURL requests per user. Do you really want your server getting hung on more than 3? Discord's API does not have a batch function.
 

ozgr

Active member
? Someone answered your question already. Whats the problem?

The Problem is that just one channel is listet in the discord chat app as it is described in my previous posts here.


1590563384274.png


Can you may, connect with anydesk and help me setup the module ?
I am already install and remove it multiple times with chaning the setting as it described, but i always get the issue, that just one discord channel will be listet in Chat App Window.
 
Top