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.
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.
Share Improve this question edited Apr 15, 2018 at 9:11 31piy 23.9k6 gold badges51 silver badges68 bronze badges asked Apr 15, 2018 at 9:09 DillgoDillgo 732 gold badges2 silver badges6 bronze badges 4- Seems fine to me. The code should work as expected. – Jonas Wilms Commented Apr 15, 2018 at 9:44
-
I just tested your code and works fine. What NodeJS version you have? And what discord.js version? Use
node -v
to get Node version andnpm list discord.js
to get the discordjs version – André Commented Apr 15, 2018 at 10:02 - finaly, I've managed myself and I patched it, if finaly works ! – Dillgo Commented Apr 15, 2018 at 10:14
- You should answer your own question with that you did to make it work, so if anyone else is having the same issue as you know what you did to solve it. @Dillgo – André Commented Apr 15, 2018 at 10:32
1 Answer
Reset to default 1ok so finaly the code that works is :
message.channel.send('my emote')
.then((msg)=> {
setTimeout(function(){
msg.edit('my others emotes');
}, 1000)
});
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744784257a4593526.html
评论列表(0条)