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

216
Visualizações
discord bot that catches all dm's and send it to webhook

I want to create a bot with discord js v13 that catches all messages from dm and send it to webhook and after admin give command /reply text bot sending back admin message to a guy that wroten message to bot, i dont know how to do it, but i need it

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

0

To create a discord bot I recommend you to use Node.js and discord.js lib.

Get the DM

First of all you will have to use the parameter partials: ["CHANNEL"] in your client constructor to allow your bot to receive and read DM

You will have to add an handler on the messageCreate event

When the event is triggered check the message channel type, if it's DM store the the message (in an array for example) and send request to your webhook.

Respond to command

Follow this guide to setup your reply command (for example a /reply which take user as parameters)

When bot receive command (dig documentation on interactionCreate event if i good remember) get the right message in the array where you store received DM)

You are done

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