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.
Estou usando seu plugin atualmente e consegui colocar tudo em um ponto funcional. Parece muito bom, ótimo trabalho!
No entanto, tenho algumas perguntas: agora que tudo está funcionando, preciso que meus usuários façam login via Discord OAuth. Isso cria uma nova conta.
Qual é a melhor maneira de eu gerenciar isso? Preciso mesclar as contas nova e antiga? Tentei fazer isso com minha conta de administrador e recebi o erro “Você não tem permissão para executar o comando discsync!” ao tentar usar o comando !discsync manualmente.
Além disso, ele ainda não copiou nenhum papel do meu Discourse.
Para sua informação, minha conta do Discord aparece nas minhas opções como uma conta associada.
As configurações acima aparecem independentemente de você adicionar este plugin ao seu Discourse.
Se você fizer login por meio da conta social, desde que os e-mails de registro coincidam, a conta será reconhecida e nenhuma nova conta será criada. No entanto, se o usuário se inscreveu no Discord usando um e-mail diferente do usado no Discourse, claro, não há como o sistema saber que se trata do mesmo usuário, então uma nova conta será criada.
Sua conta de administrador é no servidor do Discord? Você também autorizou o bot?
Concordo com isso. No pior dos cenários, posso simplesmente mesclar contas com e-mails que não correspondem.
Sim, está correto. Sou o proprietário das instâncias do Discord e do Discourse. O resultado do “Ping!” é “Pong!”. Nenhuma função foi migrada do Discourse para o Discord.
O bot está no meu servidor do Discord e tem privilégios de administrador. Posso esclarecer o que você quer dizer com “autorizar”?
Meu palpite é que suas permissões ou as do bot no servidor do Discord não estão configuradas corretamente de alguma forma. Estou apenas relembrando como funciona este plugin, já que trabalho com dezenas deles. Minha última alteração nele foi há bastante tempo!
Roger! Fiz uma verificação rápida do meu lado, então, para sua ciência, estou listado como o proprietário do servidor e tenho direitos de administrador.
EDIT: Podemos esclarecer quais direitos o bot precisa? Atualmente, ele está listado como administrador (isso foi concedido a ele por meio de uma função, e não pelo convite OAuth, no entanto).