Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
Discord.js V13 Welcome Message

I'm still fairly new to creating bots, so this welcome message worked back in discord.js v12 but no longer works for me in v13. I am trying to send a message in a specific channel when someone joins the server, but I checked, and .send does not exist on GuildChannel. I checked to documentation but they all talk about sending message embeds, but I'm just trying to send a plain message to TextChannel Here is the code.

const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
client.on('guildMemberAdd', guildMember => {
    guildMember.guild.channels.cache.get('474431129613762571').send(`**Welcome to the discord server, <@${guildMember.user.id}>!**`);
});

I can provide more information if needed. Any help will be appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need GUILD_MEMBERS intent in both the code and discord developer portal.

const client = new Client({ 
    intents: [
        Intents.FLAGS.GUILDS,
        Intents.FLAGS.GUILD_MESSAGES,
        Intents.FLAGS.GUILD_MEMBERS //also enable in discord developer portal
    ] 
})

To answer the other part of your other question, the .send exists on TextChannels. TextChannel extends BaseGuildTextChannel which extends GuildChannel. It's like this because it can be a VoiceChannel!

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda