Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

302
Views
Kick command isn't working after I mention a user

I just coded a kick command. But after I mention a user, the bot doesn't send any messages and it doesn't kick the member.

This is the code:

if (message.content==config.prefix+"kick"){
        if(!args[0]) return message.channel.send({ content: "**You need to mention someone to kick!**" })
        const kickMember = message.mentions.members.first() || message.guild.members.cache.get(args);
        const kickReason = args.slice(1).join(" ") || "No reason identified";
        if(!message.members.permissions.has("KICK_MEMBERS")) return message.channel.send({ content: "**You don't have permissions to kick a member...**" })
        if(!message.guild.me.permissions.has("KICK_MEMBERS")) return message.channel.send({ content: "**I don't have permissions to kick a member...**" })
        
        if(!kickMember.kickable) return message.channel.send({ content: "**This member isn't kickable, you need to lower their roles first!**" })
        
        kickMember.kick({ reason: kickReason })
        const kickEmbed = new Discord.MessageEmbed()
        .setTitle(`${kickMember} has been kicked!`)
        .setDescription(`Reason: ${kickReason}`)
        message.channel.send({ embeds: [kickEmbed] })
    }

What can I do?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!