How to add a discord user as a friend using Eris JS

I was looking at the Eris API for Discord and wanted to know how I could add a user as a friend using it. I tried in several ways and got nothing. My console had no errors and the sending of friendship didn’t work either. I also tried to accept a server invitation and it didn’t work either. Does anyone have a code example that works? I’ve tried the following modes:

const Eris = require("eris")
var bot = new Eris("my user token");
const getUser =;

bot.addRelationship(getUser, false); // there is no return and it does not work
bot.addRelationship(getUser); // there is no return and it does not work
getUser.addRelationship(false); // it is not a snowflake function

As far as I’m concerned, the discord API does not support bots having friends.


Also, bots cannot join servers using a server invite. They can only be invited to a server by a user with Manage Server permissions.


I was trying to use a user token for this, but it still didn’t work.

Using a user account token in order to connect to Discord’s real-time gateway is in violation of their ToS and is considered a self-bot.