我正在制作一个佣金机器人,所以人们打开一张票,然后选择它的类别,但然后我希望它要求预算等待回复,然后存储该输入预算以用于嵌入以发布给自由职业者。
我已经尝试将其存储为常量然后稍后调用它,但它不想工作,因为我将它存储在不同的函数中。
msg.channel.awaitMessages(filter, { time: 60000, maxMatches: 1, errors: ['time'] })
.then(messages => {
msg.channel.send(`You've entered: ${messages.first().content}`);
const budget = messages.first().content;
})
.catch(() => {
msg.channel.send('You did not enter any input!');
});
});
if (messageReaction.emoji.name === reactions.one) {
let web = new Discord.RichEmbed()
.setDescription("Press the check to claim the comission")
.setColor("#15f153")
.addField("Client", `${message.author} with ID: ${message.author.id}`)
.addField("Budget", `${budget}`)
.addField("Time", message.createdAt)
.addField("Requested Freelancer",`<@&603466765594525716>`)
let tickets = message.guild.channels.find('name', "tickets")
if(!tickets) return message.channel.send(`${message.author} Can't find tickets channel.`)
我希望它在 .addField 预算部分发布预算,但它只是说预算未定义
慕的地10843
相关分类