问题
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