Answer the question
In order to leave comments, you need to log in
How to make the command / setnick (person id) (new nickname)?
Good afternoon. I can't issue a command to set a nickname. The examples are wrong, please help. DJS Version - 11
Answer the question
In order to leave comments, you need to log in
After reading the documentation , you can write the following:
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
if (command === 'setnick') {
for(user in message.channel.members)if(user.id == args[0])user.setNickname(args[1]);
}
// other commands...
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question