简体   繁体   中英

Attempting to make a bot DM someone on command, discord.js

I am attempting to make a report system for my server, but would like it to be in dms. I'm trying to make it to where if someone uses the command ".report" it will dm them my google form for them to fill out? Does anyone know how to do this. This is in Java by the way.

You just have to send them a message, the doc lear you that this made this way:

user.send("message");

If you are using members it's simply this:

member.user.send("message");

If you are only using message, just add message. in front.

try message.author.send("message")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM