mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Added joining servers and better message handling
This commit is contained in:
@@ -225,4 +225,21 @@ Internal.XHR.getServer = function( token, serverID, callback ) {
|
||||
|
||||
}
|
||||
|
||||
Internal.XHR.acceptInvite = function(token, inviteID, callback){
|
||||
|
||||
console.log(Endpoints.API + "/invite/" + inviteID);
|
||||
|
||||
request
|
||||
.post( Endpoints.API + "/invite/" + inviteID )
|
||||
.set( "authorization", token )
|
||||
.end(function(err, res){
|
||||
if(err){
|
||||
callback(err);
|
||||
}else{
|
||||
callback(null, res.body)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
exports.Internal = Internal;
|
||||
|
||||
Reference in New Issue
Block a user