Ask coding questions

← Back to all posts
My nickname command is not working.
EvanDowding (0)

Today, I was working on a custom discord command for my bot that changes a user's nickname to my choosing. How it is supposed to work is: -nick @user (nickname). Obviously it did not work, otherwise, I would not be here. here is my code:

module.exports = class NicknameCommand extends Commando.Command {
  constructor(client) {
    super (client, {
      name: 'nick',
      group: 'commands'
      memberName: 'nick', 
      userPermissions: [
      clientPermissions: [
      description: 'Changes the nickname of the user'
      argsType: 'multiple'

run = (message, args) => {
  const target = message.mentions.users.first()
  const member = message.guild.members.cache.get(

    const nickname = args.join(' ')


    message.reply('You changed the nickname!')
EvanDowding (0)

And yes, that is a old token. If you try to use it, it will be invalid.