Whoops, I deleted the wrong link from the OP. (There were two plugins, I should have deleted the OAuth one, but instead I deleted the link to the bot!)
Uninstall that plugin asap, as Core now supports Discord OAuth out of the box.
The bot plugin is THIS one:
I’ve altered the OP accordingly, sorry about that!!
Do we know what the status might be of us getting this plugin to automatically update users at the time of their group joining instead of manually syncing? And potentially a way to tell it what groups/roles to sync together instead of it taking over / creating the roles itself?
First time that’s been requested so as you might imagine, it’s not even in backlog as it were.
That would be quite tricky as the bot runs on a discrete thread. You’d have to add a method to message the bot and ensure it’s listening for the request. An interesting exercise technically but not trivial.
Alternatively it might be better to explore a direct API call alternative instead of using the bot. Then you have to decide whether that warrants delivery in a different plugin based on discrete calls, not a bot.
That’s a not a bad idea but why do you need them to be different out of interest?
This is more practical.
PR accepted. Unfortunately my time is very limited to work on significant features without funding.
Well as it is now, it appears to base the roles off of the “name” instead of the title. Which means my roles on discord end up having dashing and no spaces for example. So I suppose an alternative solution is to have it base the roles not on the name but instead the full name, or default title.
That said, there are potentially groups on discourse that I would not want it to sync at all to discord.
Could we have the bot auto sync at a scheduled time in the meantime while an API method is explored? Something like, check once every hour, or 24, etc ?
I believe it would be possible to add ‘repeat this again after x hours’ like functionality no problem.
The problem with that though is that will stop every time the bot goes down (e.g. on a reboot).
The absolute best approach would be to either:
a) add a discrete API call connected to a sidekiq job to this plugin OR
b) write a new plugin that used normal API calls instead of utilising a bot (and incorporate a batch sync in that).
Either of those things are going to need sponsorship or a PR.
Estoy usando tu plugin actualmente y tengo todo en un punto funcional. Parece realmente bueno, ¡buen trabajo!
Sin embargo, tengo algunas preguntas: ahora que tengo todo funcionando, necesito que mis usuarios inicien sesión a través de Discord OAuth. Esto crea una nueva cuenta.
¿Cuál es la mejor manera de gestionar esto? ¿Necesito fusionar las cuentas nueva y antigua? Intenté hacerlo con mi cuenta de administrador y obtuve el error “No tienes permiso para ejecutar el comando discsync!” al intentar ejecutar manualmente !discsync.
Además, aún no ha copiado ningún rol desde mi Discourse.
Para tu información, mi cuenta de Discord aparece en mis opciones como una cuenta asociada.
La configuración anterior aparece independientemente de si agregas este plugin a tu Discourse.
Si inicias sesión con la cuenta de redes sociales, siempre que los correos electrónicos de registro coincidan, la cuenta debería ser reconocida y no se creará una nueva cuenta. Sin embargo, si el usuario se registró en Discord con un correo electrónico diferente al de Discourse, por supuesto, no hay forma de que el sistema sepa que es el mismo usuario, por lo que se creará una nueva cuenta.
¿Tu cuenta de administrador en el servidor de Discord? ¿También autorizaste al bot?
Coincido con eso. En el peor de los casos, puedo simplemente fusionar cuentas con correos electrónicos que no coinciden.
Sí, es correcto. Soy el propietario de las instancias de Discord y Discourse. El resultado de “Ping!” es “Pong!”. Ningún rol ha sido migrado de Discourse a Discord.
El bot está en mi servidor de Discord y tiene privilegios de administrador. ¿Puedo aclarar qué quieres decir con «autorizar»?
Mi corazonada es que tus derechos o los del bot en el servidor de Discord no están configurados correctamente de alguna manera. Solo estoy repasando este plugin mientras trabajo en docenas de ellos. ¡Mi último cambio en este fue hace un tiempo!
¡Roger! He hecho una verificación rápida de mi parte, así que para tu información, figuro como propietario del servidor y tengo derechos de administrador.
EDITA: ¿Podemos aclarar qué derechos requiere el bot? Actualmente figura como administrador (esto le fue otorgado a través de un rol y no mediante la invitación OAuth, sin embargo).