Daystodiewebapi.kickPlayer()

Kick a player from the server

Usage

Hover over inputs/exits for more info.

var Daystodiewebapi = require('machinepack-7daystodiewebapi');


// Kick a player from the server

Daystodiewebapi.kickPlayer({

ip: '192.168.0.1',

port: '8082',

authName: 'csmm',

authToken: 'EOGHZANOIZEAHZFUR93573298539242F3NG',

playerID: '76561198028175841',

reason: 'Spamming the chat',

}).exec({

// An unexpected error occurred.

error: function (error) {

 

},

// Server refused the request (usually means server offline)

connectionRefused: function () {

 

},

// Not authorized to do this request

unauthorized: function () {

 

},

// The given player id is not valid

unknownPlayer: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

ip required

IP of the server to send a request to

'192.168.0.1'
port required

Port of the server to send a request.

'8082'
authName required

Authorization name to send with the request

'csmm'
authToken required

Authorization token to send with the request

'EOGHZANOIZEAHZFUR93573298539242F3NG'
playerID required

Steam ID of the player to kick

'76561198028175841'
reason

Reason for kicking the player

'Spamming the chat'

Exits

error

An unexpected error occurred.

connectionRefused

Server refused the request (usually means server offline)

unauthorized

Not authorized to do this request

unknownPlayer

The given player id is not valid

success

OK.