لقد بحثت في واجهة برمجة تطبيقات Discourse، وتساءلت عما إذا كان يمكن الحصول على معلومات إضافية حول الحسابات الخارجية (من شبكات اجتماعية أخرى) من خلالها.
في حالتي، سيكون الأمر متعلقًا بـ Discord: أرغب في مزامنة الأشخاص الذين ينشئون حسابًا على المنتدى مع دور معين في خادمي. عند تنفيذ أمر يكتبه المستخدم، سيتحقق بوت Discord مما إذا كان حساب Discourse يحتوي على حساب Discord الخاص بالمستخدم المرتبط به باستخدام معرفه. (قد يكون الأمر صعب الفهم بعض الشيء، آسف '^^)
I’ll give it a try and keep you all up-to-date here. —
EDIT : I had tried this already. It spams the Discord API and almost got my original bot banned last time — Can’t use this. I’d rather make use of the Discourse API myself, and get IDs easily. Plus, it’s not working the way I want it to work.
What I’d basically like to have is a !check command. When the user runs it, it checks the Discord user’s ID and on the site if an account with the same ID exists. If it does, it gives a role. If not, it doesn’t.