<Message>.send()
是一个Promise,这意味着您可以在消息发送后使用.then()
函数。例如,您的代码应该像这样:
msg.send({
embed: {
"title": "Success",
"description": `Successfully added ${args[1]}\nUse \`m!stock\` to see it.`,
"color": "#22ba4a"
},
}).then(() => {
msg.send({
files: [free]
});
});
Promises
.then()