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

100
Views
Discord.js messaging errors

I've been recently working on my second Discord.JS bot. I coded some basics and tested it. However, when I use the .verify command, it didn't make any reactions. Please help!

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const { token } = require('./config.json');
const prefix = "."

client.on("ready", () => { console.log(`Logged in as ${client.user.tag}!`) })

client.on('message', message => {
    if (message.content.startsWith(`${prefix}verify`)) {
        message.channel.send('SUCCESFULLY VERIFIED');
    }
})

client.login(token);
about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

maybe after message.channel.send('SUCCESFULLY VERIFIED') put .catch(console.error)

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const { token } = require('./config.json');
const prefix = "."

client.on("ready", () => { console.log(`Logged in as ${client.user.tag}!`) })

client.on('message', message => {
    if (message.content.startsWith(`${prefix}verify`)) {
        message.channel.send('SUCCESFULLY VERIFIED').catch(console.error)
    }
})

client.login(token);

actually we can't do anythink because you don't send the error

about 4 years ago · Santiago Gelvez Report

0

  1. You should add the GUILD_MESSAGES intent.
  2. In discord.js v13 they changed client.on('message') to client.on('messageCreate').

Documentation

about 4 years ago · Santiago Gelvez Report
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!