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

220
Views
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 answers
Answer question

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 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!