Getting User profile connections with a bot account

点点圈 提交于 2019-12-25 00:26:45

问题


I'm trying to add a feature to my Discord bot: when my Twitch account gets a new follower, and if the follower's Twitch account is linked to his Discord account, when he gets into my server he's getting automatically a new role.

So my question is: can I get the Discord's linked apps of a user, and get the user ID linked to those apps?
Like getting the Twitch's user ID of the new follower and compare it with with the Discord's linked Twitch user ID of the users of my channel using Discord.js?


回答1:


At the moment, the API doesn't allow fetching the profile (and so its connections) from a bot account. The discord.js library has a method to do this (User.fetchProfile()), but it will only work on self-bots (Discord can ban you for using them).

Discord Dream Land has an active idea on this topic: link



来源:https://stackoverflow.com/questions/51354531/getting-user-profile-connections-with-a-bot-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!