Hello I'm trying to deafen a particular person in discord but I keep getting the following error:
TypeError: message.setDeaf is not a function
The discord js docs state that you should deafen members like this.
.setDeaf(deaf)
Deafen/undeafen a user.
I'm unsure as to why I'm getting this error, below is my code;
var Discord = require("discord.js");
var client = new Discord.Client();
var user = "30898500862111287"
client.on('ready', () => {
console.log('I am ready!');
});
client.on('message', function(message) {
if (message.content === '$deafen') {
message.setDeaf(user);
}
});
via fragile
No comments:
Post a Comment