Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
Discord.JS Message in a specific Channel

So i'm new to the whole Discord.JS thing and i am trying to figure out how to get the bot to write a message to the General Chat when a new person joins.

I have seen a lot of people doing it like this:

const channel = client.channels.cache.find(channel => channel.name === channelName)
channel.send(message)

But this isnt working for me. Whenever i am trying to send a message with the channel.send(message) it gives me a error message.

I have also tried the version where you do it with the client.channels.cache.get(<Channel-ID>)

But this also didnt work for me.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use this code similar to the post: how to send a message to specific channel Discord.js

<client>.channels.fetch('<id>').then(channel => channel.send('<content>'))

Example

client.channels.fetch('922880975074127872')
.then(channel => channel.send(`Welcome, ${user}`))
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda