【问题标题】:how to collect user message in DM in Discord.js如何在 Discord.js 中收集 DM 中的用户消息
【发布时间】:2021-10-17 23:48:06
【问题描述】:

我正在尝试收集用户对我的机器人消息的响应,但这一切都发生在 DM 中。如何使用 Discord.js (13.x) 完成此任务?

    const Discord = require('discord.js');
const intents = new Discord.Intents(32767);
const client = new Discord.Client({ intents });
const config = require('./config.json');
const privateMessage = require('./private-message');
client.on('ready', () => {
    console.log('Ready!');

    privateMessage(client, '!match', 'hello please enter your birthday as this following format day/month ')

})


client.login(config.token)

【问题讨论】:

    标签: javascript node.js discord.js


    【解决方案1】:

    您可能希望为此使用收集器。 discord.js 网站上有一个简单的指南。

    https://discordjs.guide/popular-topics/collectors.html

    【讨论】:

      猜你喜欢
      • 2019-11-25
      • 2018-05-27
      • 2021-12-31
      • 2021-10-28
      • 2021-11-09
      • 2018-12-02
      • 2020-12-30
      • 1970-01-01
      • 2021-03-31
      相关资源
      最近更新 更多