I have a Bot to check the CSGO ranks of members and give them a role on a discord server.
The bot wants to be added on steam right now. How can I make, that the bot steam account sends an request?
This is the code:
steamClient.on('friendRelationship', async (sid, relationship) => {
if (relationship === SteamUser.EFriendRelationship.Friend) { // If the relationship changes to "Friend" it means we are now friends
// Find the user in our "onGoing" map
var found = undefined;
onGoing.forEach((value, key) => {
if (value.steamid === sid.getSteamID64()) {
found = {};
found = { discord: key, steam: sid.getSteamID64(), channel: value.channel, message: value.message };
}
});
if (found === undefined) { // This shouldn't really happen
steamClient.removeFriend(sid);
return;
}