我想在发送后直接将我的机器人消息添加到数组中^^
我试过这样的事情:
task_chan.send('', {
embed: {
color: task_colors[0x808080],
title: 'Tache n°1',
thumbnail: {
url: 'https://...'
},
author: {
name: 'Tache à prendre',
icon_url: 'https://zupimages.net/up/20/12/xqsf.jpg'
},
fields:[{
name: "Tache à faire :",
value: "...",
},{
name: 'Avancement de la tache :',
value: 'Non commencée'
}]
}
})
.then(tasks.push(bot.user.lastMessage))
tasks
使用定义var tasks = []
当我执行此代码时,它会正确发送消息,但不会将其保存在数组中,它是之前保存的消息。我希望你能帮帮我 :)