我希望把它这么一个主持人呢!接着,主机的僵尸程序,你想什么时候就开始?然后用户响应17:00(CET)机器人能做什么游戏模式用户响应正常的2v2或类似的东西博特响应要承载用户响应@NaP博特响应博特谁做然后替换下面的值
if (m == '.nap tournament' || m == '.tournament info' || m == '.nap t' || m == '.nap tourny' || m == '.ti') {
message.channel.send({
embed: {
color: 000000,
author: {
name: bot.user.username,
icon_url: bot.user.avatarURL
},
title: "**Nap Weekly Tournament**",
description: "Every Week We Have A Tournament For All The Nappies!!!",
fields: [{
name: "**Time**",
value: "Saterdays at 17:00 CET or 5:00 pm CET."
},
{
name: "**Gamemode**",
value: "Normal 2v2"
},
{
name: "**Tournament Host**",
value: "<@!" + 'Whoister#7002' +
">"
}
],
timestamp: new Date(),
footer: {
icon_url: bot.user.avatarURL,
text: "Arrara bot"
}
}
});
我建议使用内置到discord.js,因为它看起来更干净,这是很容易使用为好,这里是一个例子RichEmbed类:
const embed = new Discord.RichEmbed()
.setTitle("This is your title, it can hold 256 characters")
.setAuthor("Author Name", "https://i.imgur.com/lm8s41J.png")
.setColor(0x00AE86)
.setDescription("Embed description here")
message.channel.send({embed});
这里是看到其他的东西,你可以添加到嵌入的链接:https://discord.js.org/#/docs/main/stable/class/RichEmbed然后对付像你这样的用户响应想,我会使用一个消息收集,https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=createMessageCollector你可以找到一个例子有作为,你可以设置过滤器的用户ID,例如const filter = m => m.author.id === message.author.id
。您还可以使用maxMatches设置的射出end
事件之前收集的信息的最大数量。 channel.createMessageCollector(filter, { maxMatches: 2 }); //Will collect 2 messages and then emit 'end' event
。要照射的其他事件collect
它每次发射一个响应返回匹配过滤,并让你可以使用一些诸如collector.on('collect', m => console.log("Collected:" + m.content));
该响应的内容。您可以创建多个收藏家和之间,首先提示用户发送消息,然后让他们的意见。