Iād be happy to invite you into my instance? I donāt know if your plugin logs anywhere, would be able to send you that if it helps?
EDIT: When you authorised the bot, what permissions did you allocate it there?
Iād be happy to invite you into my instance? I donāt know if your plugin logs anywhere, would be able to send you that if it helps?
EDIT: When you authorised the bot, what permissions did you allocate it there?
The bot needs Administrator:
You need to grant permissions via the browser as described here (and in the OP):
something like: https://discord.com/api/oauth2/authorize?client_id=YOURCLIENTID&scope=bot&permissions=8
Your issue is almost certainly Discord side since the Discourse bot server seems to be running (you have shown this with the Ping!
command), so Discourse logs will be irrelevant.
Iāve just retested this plugin on the latest Discourse version and everything is working (I updated a couple of gems to a more modern version to ensure compatibility with other plugins but this is irrelevant to your issue).
Yep, so Iāve reinvited it a couple of times with no change. It is an admin, it has the bot scope. I am the person inviting it to the discord, Iām the owner of the discord server. It just doesnāt recognise me and returns āYou donāt have permission to execute command discsync!ā
Iām bamboozled, unfortunately!
Did you set these up in Discourse settings?:
Huzzah! It seems I managed to malform the Admin Group ID somehow! Looks like my copy/paste job may have missed a numberā¦
So as a follow on question, Iām now trying to assign people colours in Discord based on their trust level in Discourse. To get trust levels to copy across, I reckon the command should be:
!discsync false, 0, true
Is this correct? It returns the following for me:
EDIT: The same is returned if I run the command without commas, i.e.:
!discsync false 0 true
Increase your Visibility Level. The standard automated Groups default to Visibility 1 (āLogged on usersā), so if this value is zero you exclude the default automated Groups:
Zero will only include Groups visible to everyone including anonymous.
That is me squared away. Thank you very much - greatly appreciated.
Can I help out, in return, by writing some of what I have learned into your guide? If not, no dramas; Iām just hoping to pay forward your support.
Thatās very kind. Would be delighted to have you edit it. You should be able to already? Itās a wiki
You helped me also to refresh my memory
I donāt really need role syncing but a discord bot that posts in specific channels of the discord server when new topics are made in the forum, would be nice. Is there any plugin that can do that?
Yeah this plugin is probably not the right tool for that. The bot is powered by your Discourse and can access your Discourse data (where permitted and prompted by command) but runs in a separate thread so will not be signalled by Discourse events.
I guess it might be feasible to extend it at some point to eg watch for a new Topics within a specific category. Not the best use of this architecture but PR welcome.
Sounds like you need to investigate?:
Or
Yep, I investigated both of those options. The first option, Zapier, isnāt free. You can make up to 5 free Zaps and those are single-step zaps. This is exactly what was said in that thread, so the alternative that was proposed was the discourse-chat-integration which is supposedly an official plugin. I think this is the closest way to do what I want to do.
The last option seems to be an RSS feed plugin:
Update: After learning to properly setup the rules and configuring the webhooks, the chat-integration does exactly what I wanted! Thanks.
Hey @merefield,
thanks again for reaching out with this plugin!
I installed everything like described in the docs. I use this command: !discsync
and everything is looking good to me.
However for some users (not for all) I get for all of their groups this error:
Discourse Sync: [11/31] Adding member 'MaxMustermann' to 'Member'
Discourse Sync: I dont appear to have rights to do this though!
ERROR on server XYZ (ID: 123123123123) for command ^add_role, undefined method add_role' for nil:NilClass
Other users are able to be sync for the same group
That suggests your provider_uid
in Discourse is not set for that user. Please investigate.
Well done for setting this up btw. Itās quite complex and not for the faint hearted! :).
I ran this query in the Knowledge Explorer Plugin:
SELECT *
FROM user_associated_accounts u
WHERE u.provider_name = 'discord'
I canāt post the result for reasons but I checked every user for their provider_uid
and each user has one. Is there anything else I could debug?
Then the next most likely issue is that the currently mapped Discord UID is wrong.
ie the data in Discourse is not mapping to a valid UID in Discord.
Check this users record in Discord manually and confirm it is correct.
Hey, I can confirm this. The user has another UID in Discourse than in Discord.
How can this issue be reproduced?
Could you delete the association and ask the user to recreate by associating Discord once more? If it happens again, something is buggy with the social login?
Hey,
I just wanted to do an follow up. I was talking to the people who had these issues. We could determine the possible issue.
The User signed up with his old discord account which he didnāt joined the server with. So the Sync Bot could not find the discord user I guess and errored.
Thanks for clarifying. Can you confirm how you resolved? Did you delete his association and then get him to reassociate?
Thatās what we did.