所以,捎带我之前的问题tick up order number
;
这个数字会上升,但每隔一段时间它就会在我不做的情况下重置。有没有办法阻止它这样做?
订单号命令:
let baseOrderNumber = 0;
baseOrderNumber++;
let order = args.join(" ")
const orderTime = order + Date.now()
if(order) { client.transferedOrder = order; }
const orderEmbed = new Discord.MessageEmbed()
orderIcon = "https://i.imgur.com/Le0Eist.png"
orderEmbed.setTitle("New Order")
orderEmbed.setColor("#FF2D00")
orderEmbed.setThumbnail(orderIcon)
orderEmbed.addField("Order Number", baseOrderNumber)
orderEmbed.addField("Order", order)
orderEmbed.addField("Customer", message.author)
orderEmbed.addField("Server Invite", invite)
orderEmbed.addField("Ordered At", message.createdAt)
bot.channels.cache.get('723838675489914891').send(orderEmbed)
let eekowo = fs.writeFileSync('orderAuthors.txt', message.author.tag);
}
示例:有人以订单号 #1 下订单;其他人在 5 分钟后下订单,但也有订单号 #1
感谢任何能提供帮助的人