Issue with a Discord.js command giving Internal Error

Hello, I have been making a discord bot but one command doesn’t seem to work. ` if (command === “ban”) {
// Most of this command is identical to kick, except that here we’ll only let admins do it.
// In the real world mods could ban too, but this is just an example, right? :wink:
if (
!message.member.roles.cache.some(r => [“MOD”].includes(
return message.reply(“Sorry, you don’t have permissions to use this!”);

let member = message.mentions.members.first();
if (!member)
  return message.reply("Please mention a valid member of this server");
if (!member.bannable)
  return message.reply(
    "I cannot ban this user! Do they have a higher role? Do I have ban permissions?"

let reason = args.slice(1).join(" ");
if (!reason) reason = "No reason provided";

await member
  .catch(error =>
      `Sorry ${} I couldn't ban because of : ${error}`
  `${member.user.tag} has been banned by ${} because: ${reason}`

}this is what it says in discordI couldn’t ban because of : Response: Internal Server Error` what is the issue? I checked my code with but don’t see any issues.

Discord’s API might be having some issues, try again later.

Ohh, alright. Didn’t think of that lol.

1 Like

500 errors often mean that the problem is with the server, good luck with this later!

Its still giving the error. I tried using other bots to do it and they work but for some reason mine gives Internal Error alert. Could it be an issue with the code?