【发布时间】:2020-12-31 09:06:25
【问题描述】:
所以我做了一个建议命令,它将带有建议者名称和建议的嵌入发送到特定频道。然后它与 ????还有??????。
我怎样才能创建一个收集器,计算反应并在例如 1 周后停止它,并向特定角色的每个人(例如 员工)发送结果并编辑频道中的嵌入说建议接受/拒绝。
另外,我怎样才能使收集器运行具有权限的命令(例如角色 员工)
我知道我要求很多,但我查看了 discord.js.org 的文档,但我无法理解。 感谢您抽出时间来帮助我!
到目前为止,这是我的代码:
if (command === 'suggest') {
if (!args.length) {
const suggestHelp = new Discord.MessageEmbed()
.setTitle('Suggestions')
.setDescription('Help')
.addField('Usage', 'The easiest way for community to rate suggestions!')
.addField(
'Commands',
'`/suggest` Displays info about the suggestions \n `/suggest <suggestion>` Make a suggestion, which can be rated by the community'
)
.setFooter('Powered by Monebot')
.setColor(0x2e86c1);
message.channel.send(suggestHelp);
return;
} else if (args.length) {
let suggestor = message.author.username;
let suggestionText = args.slice(0).join(' ');
const suggestEmbed = new Discord.MessageEmbed()
.setDescription(suggestionText)
.setColor(0xf5b041)
.setAuthor(`Suggestion from ${suggestor}`);
//.setThumbnail('https://i.imgur.com/wSTFkRM.png')
client.channels.cache
.get('ID')
.send(suggestEmbed)
.then((messageReaction) => {
//Setup 1 Channel ID for suggestions
messageReaction.react('????');
messageReaction.react('????');
});
}
}
【问题讨论】:
-
您有什么问题?我建议您在来这里之前尝试制作您列出的所有内容,您有错误吗?
标签: javascript node.js discord discord.js