简体   繁体   English

我想做一个 Discord.js 反应收集器、计数器、计时器和角色 dm

[英]I want to make a Discord.js reaction collector, counter, timer and role dm

So I made a suggestion command which sends an embed with the suggestor name and the suggestion to a specific channel.所以我做了一个建议命令,将带有建议者姓名和建议的嵌入发送到特定频道。 It then reacts with 👍 and 👎.然后它与 👍 和 👎 反应。

How can I make a collector, that counts the reactions and after eg 1 week it stops it and DMs everyone in a specific role (eg Staff ) with the results and edits the embed in the channel saying Suggestion accepted/denied .我怎样才能制作一个收集器,它会计算反应,并在例如 1 周后停止它,并将结果发送给特定角色(例如员工)的每个人,并编辑频道中的嵌入内容,说“建议接受/拒绝”

Also, how can I make a collector that runs a command with permissions (roles eg Staff )另外,我如何制作一个运行具有权限的命令的收集器(角色,例如Staff

I know I am asking for a lot, but I looked at discord.js.org's documentation and I couldn't understand it.我知道我要求很多,但我查看了 discord.js.org 的文档,但我无法理解。 Thanks for taking off your time to help me!感谢您抽出时间来帮助我!

Here is my code so far:到目前为止,这是我的代码:

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('👎');
   });
 }
}

You are not specific with what you want us to help you with.您没有具体说明您希望我们为您提供哪些帮助。 You're asking us too much to do in one time and you litterally gave us you code and asked us to change it ^^'你一次要求我们做太多事情,你乱七八糟地给了我们你的代码并要求我们改变它^^'

But i get what you are trying to do so i suggest you to search in a discord.js guide wich is extremelt helpful in this case但我明白你想要做什么,所以我建议你在discord.js 指南中搜索,这在这种情况下非常有用

If i helped you can approuve this suggestion, if not please edit yours so that we can help you.如果我帮助您,您可以批准此建议,如果没有,请编辑您的建议,以便我们为您提供帮助。

  • Markdown would be helful Markdown 会很有帮助

And i have the same question as ortogonal我和 ortogonal 有同样的问题

What are you having issues on?你有什么问题? I would suggest you try to make everything you listed before coming to here, do you have an error?我建议您在来这里之前尝试制作您列出的所有内容,您有错误吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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