Discord Sync: sync a Discourse forum with a Discord server

This particular functionality is so important to us, since we manage all of our roles via Discord. It would be nice to have a way to sync up the groups from Discord to Discourse. Even if they’re only “synced” via name and permissions, etc. are configured after the fact.

@barreeeiroo : do you have any plans for something like this? or have any advice on where to go from here? The manual management of roles via “Safe Roles” is almost good enough. I have roles that have spaces in them and therefore cannot add these into the Safe Roles field. Instead of manually updating all of my roles in discord and adding them without spaces is there another route I can go with?

It would be so nice to have the groups from discord “pushed” to the discourse groups instead, if possible.

Thanks for your work on this plugin!

Edit: The proposal to use Role IDs instead of names would solve a lot of issues on my end for sure.

1 Like

I’m still having issues setting this up. For roles on Discord is it looking for an ID or name? Also, instead of a “protected roles” could you add it so I can synchronize only specific roles?

I don’t know ruby otherwise I’d offer up my assistance. I’ll probably learn the basics or just implement something via the API in Java.

I found my issue, had the name of the admin channel instead of its id. Now I just gotta do some permission/role checking to see why nothing actually happens

1 Like

I just wanted to mention: I built the inverse of this plugin, which syncs discord roles to discourse groups: Sync your Discord roles with your Discourse groups! - YouTube

4 Likes

Is there any wat that you can sync the discord roles with discourse, instead of sync discourse roles with discord?

That’s the point of this plugin? Is it broken? Also take a look at my bot plugin linked in the OP which performs discourse → discord (albeit using bot command)

2 Likes

All plugins here, gives you the roles you have on discourse to your discord account. It doesn’t gives you, your discord roles on your discourse account.

That’s the opposite of your original question?

@spirobel ’s plugin does that I believe?

2 Likes

No, it does example if you have “Community Moderator” in Discourse, it will change your discord role.
But if you have “Community Moderator” in Discord, it won’t change your role in Discourse

1 Like

I think you may have missed what I was referring to: Discord Sync: sync a Discourse forum with a Discord server - #17 by spirobel

Over to you @spirobel

3 Likes

I missed that, his plugin is a custom made plugin for 400 usd

1 Like

is he actually selling that for 400$? that’s ridiculous.

1 Like

ridiculously cheap. There are not many people interested in this usecase that are willing to pay money for it. It takes time to research these topics, write and maintain the software. That is not for free and if there are not many customers the price reflects that.
The other issue is: the lower the price the more demanding the customers. I just dont have the time to deal with support issues and questions of people that paid 25$ for it.
If you have a suggestion how I can make money and not get hassled while selling at a low pricepoint, please let me know.

4 Likes

Yeah, I remember reaching out about using their plugin, and I can totally see why they would want to charge how much they do. I know that plenty of communities can afford that price point but, it isn’t necessarily affordable for smaller communities.

I ended up making my own solution by adding to my Discord bot (Java based since I don’t think I could easily do this entirely via a Discourse plugin, at least not yet), which has the added functionality of some bidirectional logic. In the future, I am hoping to make this feature available to the public once my Discord bot is finished, but that will depend on how much free time I have. Here’s my bot in action in case anyone wants to take a look: https://p185.p2.n0.cdn.getcloudapp.com/items/4guZZEP1/b138570f-071c-4373-ada5-b7ed2cd63b26.mp4

Also, if anyone would be interested in being a beta tester for once I make this public, feel free to send me a DM - I don’t have an ETA on when I’ll have something working but, I might consider making this a standalone feature if needed.

5 Likes

You realise a Discourse Discord Bot framework already exists here that you can fork, modify and extend? Discord Bot Construction Kit 🤖. It does 99% of the housekeeping so you can focus on the functional side (it evens runs on your Discourse server so no additional infrastructure is required). The existing features act as a guide to whatever you want to add.

I would also accept PRs if you came up with anything useful to other communities.

6 Likes

I think I did see that - I just am not familiar with Ruby so, I just added the feature directly to my bot that I was already working on for years before using Discourse. I definitely would consider doing a PR for that but, when I wrote this feature for my community I was on a time crunch so learning Ruby was out of the question. I’d definitely consider taking on Ruby as my next programming language and give this a shot though! :grinning:

Edit: Also thank you for bringing up that it is easily customizable - I didn’t realize that at first. I just got intimidated when I last attempted to modify a Discourse plugin lol

3 Likes

Give Ruby a chance, it’s actually a fun programming language :slight_smile:

5 Likes

I’m having issue while testing this plugin after all setting up during the testing getting some permission error.
Discordrb::Errors::NoPermission (The bot doesn’t have the required permission to do this!) lib/promotion.rb:136:in recalculate' app/models/group_user.rb:117:in recalculate_trust_level’

Attaching screenshot for reference:

Could anyone help me here ?

1 Like

Does your Discord bot have permissions set properly? You’d need the bot to be above any roles that it would be assigning, and would need to have the Manage Roles or Administrator permission on the bot’s role.

1 Like

yes, We have provided all the permission including Administrator, Manage Roles, Manage Nicknames.