I am currently working on a discord bot (using the discord.js library). This bot uses steam integration to get a user's inventory. Is there a way to check if the person has steam connected to their account and get their steam account ID? If not, how should I make sure people can link their steam account to my bot?
I think you might search for this specific documentation/implementation (User -> UserProfile -> UserConnection), but I wouldn't recommend using it, since it is really instable and you can only use it as a normal user not as a bot.
I would rather think about implementing a link system on your own, where user can try to link their accounts and mods must approve those linkings.
The Discord API does not support this through Bot Accounts as far as I'm aware. As noted previously it's only possible using User accounts, though automating user accounts is against the Discord Terms Of Service and the Discord API Terms so I wouldn't recommend it.
Related
Using a user token, how can I have the user leave a Discord server? I wanted to make a website where you put your user token and it will leave discord server.
As per discord terms of service the use of "self bots" is not allowed
A "self bot" is when a normal discord user account is automated in some way, for example leaving all servers or automatically sending messages.
Another reason why this is not recommended is the security concern, how does the user know that your website won't steal their token and "hack" their account?
Saying that there is of course a way to do it neglecting terms of service and user safety. A starting point would be the discord API or a discord library like discord.js. I won't spoon-feed you code, do some research your self and if you encounter a more specific problem come back and ask.
We are using sample from https://github.com/AgoraIO-Community/Angular-Agora-RTC The channel name is hard coded in the sample. When 2 users need to connect for a call. Ideally both should be on same channel. Is there a way for user-1 to check whether user-2 is online using agora-web-sdk?. If the user is online, how can user-1 share a channel-id with user-2?
One-to-one video call implementation using agoara sdk. For 2 user to have a call, they should be in same channel. Link above has the sample I am trying. Not sure how two user share same channel name with each other being in 2 different mediums at real-time.
https://github.com/AgoraIO-Community/Angular-Agora-RTC
If agoara provides an API to check if user-2 or user-1 is online after these user's have created clients in web. Is there a way to exchange "channel id" between active users.
There is no such answer to this question anywhere on internet believe me i have searched for it, only thing that came to my mind is to use some type of User Base like Firebase, PHP MySQL etc to setup user and then login those users in your app.
After logging in, set various flags for user presence like is_online, last_active, is_broadcasting, is_audience etc to determine which user is online.
You can then put channel name along with other user details when the user login and starts the Broadcast.
After the user is broadcasting, use those flags you used before and query them to get the broadcasting users and show them where ever you want for other users to join their broadcast.
This as simple as it can be in terms of explaining a really frustrating problem but in the end its only you who would have to implement any type of logic you can come up with.
Hey I'm trying to make a bot that will check user's connected battle.net account and load game rank. I'm using discord.js library and trying to acccess UserProfile via bot, which isn't allowed since you can't .fetchProfile(). Based on discord.js I'm only allowed to check UserProfile and then connections this way.
My question is: is there any way for bot to load user's connected accounts ? I only need battle.net tag that user verified and connected to discord account.
User: https://discord.js.org/#/docs/main/stable/class/User
UserProfile: https://discord.js.org/#/docs/main/stable/class/UserProfile
Thanks a lot !
Unfortunately this is not possible when using a "real" bot account, however it is possible if you're using a user bot account.
I'd suggest a workaround of using OAuth2. You could have users authenticate your bot with OAuth2, and then fetch their connections this way. Some more information at https://discordapp.com/developers/docs/topics/oauth2
I think I might have a way to get close to that. It took me a while, but I think I've figured out how you can check if someone (in my case, just the bot itself) is playing a certain game. You could probably replace client.user with the user you want to check. Here's the code:
if (client.user.presence.game.name == "INSERT GAME TO LOOK FOR HERE") {
ACTION TO BE CARRIED OUT
}
I have an idea for a Minecraft plugin which will allow users to log into the website associated with the server without requiring registration, all they would require is their Minecraft username.
I'm trying to find the best way to get Auth0 to authenticate users through a custom passwordless strategy, instead of the default email or SMS which Auth0 provide.
The context which I'll be using this in is as follows:
Minecraft username is entered as their login on the site > Magic link is sent to their text box in-game through a custom plugin and listener > User clicks on the magic link and they are authenticated using Auth0 (JWT token for 30-ish days).
Does this sound possible? or is it wishful thinking.
I know I'll need a custom listener to look for requests from Auth0 and something to return the magic links to the user in-game through a java plugin.
I see no reason that it wouldn't be possible, but there are a few factors to take into consideration:
Minecraft chat cannot be assumed private and direct. There are chat logs and plugins that can intercept your messages. Passwordless auth is like communicating a one-time-use password, so why would you send it via insecure means?
If we assume it's secure, typically it's the responsibility of the user to store the JWTs. If this is a vanilla client, you have no method of storing data on the client, so in the end the server is managing JWTs, which kills the entire reason to use them. Otherwise, why not just have the listener add the player to, say, a cache that expires Players after 30 days of not being accessed?
Other than these two kinks that can be worked out, it sounds like a cool idea. Good luck with it!
I'm trying to build some kind of a social game in facebook, where I need that every user that has approved my APP is able to receive notifications from me.
When the user approves my App, I save his UID in the DB for future reference.
At some later time, I want to make it possible for other users find partners for a game - so I need a way to pick randomly some user from my DB and check if he's online. Then, send him a message and propose to play with the current player.
So 2 questions:
How can I check if some user is online, using Javascript SDK? It seems that in the new Graph API I can't get the users' online status.
How can I then send him a message and propose to play the game? When he approves to play - he is being forwarded to the game page.
Many thanks in advance,
Roman
To get the user status you can try FQL, check this answer: How to get list of online friends using FQL with facebook API?
About your second question, check this: how send message facebook friend through graph api using Accessstoken