问题
I want my bot, to send my emotes
, wait 1 seconds and edit the message to my others emotes
.
Here's my code :
message.channel.send('my emotes')
.then((msg) => {
setTimeout(function() {
msg.edit('my other emotes');
}, 1000)});
And he send me this error : Cannot read property 'edit' of undefined
Thanks you for helping me.
回答1:
ok so finaly the code that works is :
message.channel.send('my emote')
.then((msg)=> {
setTimeout(function(){
msg.edit('my others emotes');
}, 1000)
});
来源:https://stackoverflow.com/questions/49840290/discord-js-send-and-wait-before-editing-a-message