【发布时间】:2020-07-20 19:20:29
【问题描述】:
const Discord = require('discord.js');
const bot = new Discord.Client();
const PREFIX = "!!";
bot.on("message", async message => {
if(message.content.toLowerCase().startsWith(`${PREFIX}suggest`)) {
//a user says "!!suggest more commands"
message. /*ID <@206377170707152906>*/ .send(`The user {$message.author.name.toString()} has given a suggestion; "${message.content.toString()}`);
//then a DM is sent to the <@206377170707152906> ID saying (the ID is different from user ABC123's ID) "The user ABC123 has given a suggestion; "!!suggest more commands"
message.author.send(`The suggestion "${message.content.toString()}" has been sent!`);
return;
}}
如何将ID“”放入message.send,以便将DM发送到“”ID?
【问题讨论】:
标签: javascript node.js discord discord.js