簡體   English   中英

Discord.js DM中如何收集用戶消息

[英]how to collect user message in DM in Discord.js

我正在嘗試收集用戶對我的機器人消息的響應,但這一切都發生在 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)

你會想為此使用一個收集器。 discord.js 網站上有一個簡單的指南。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM