Open JohnYuZhang opened 5 years ago
I want to retreive a member status of a specific member through:
var bot = new Discord.Client({ token: auth.token, autorun: true }); bot.on('ready', function (evt) { logger.info('Connected'); logger.info('Logged in as: '); logger.info(bot.username + ' - (' + bot.id + ')'); console.log(bot.servers[data.serverID].members[data.userID].status) });
(assuming this is now you get the server id)
but it says the members object is undefined.
I've also tried: bot.getMember(data,function(err,res){console.log(err)} ) which returns an unauthorized error. name: 'ResponseError', statusCode: 401, statusMessage: 'UNAUTHORIZED', response: { code: 0, message: '401: Unauthorized' } }
bot.getMember(data,function(err,res){console.log(err)} )
The example files on message and presence work fine without any authorization errors.
I want to retreive a member status of a specific member through:
(assuming this is now you get the server id)
but it says the members object is undefined.
I've also tried:
bot.getMember(data,function(err,res){console.log(err)} )
which returns an unauthorized error. name: 'ResponseError', statusCode: 401, statusMessage: 'UNAUTHORIZED', response: { code: 0, message: '401: Unauthorized' } }The example files on message and presence work fine without any authorization errors.