#[SOLVED] Having Issue with getting ID of a message out of a .then to use it later
8 messages · Page 1 of 1 (latest)
All I have to say, without seeing the code only from the title. Is that you cannot use a variable assigned in a .then outside of the .then, the function in it is called after and not directly which makes this impossible. If you need it outside, make it so your code uses it inside instead or use await to simplify your code
@lament igloo I saw you did post your code but one of the bot thinks there is a link in it. I unmuted you and please send your code using pastebin or hastebin or anything you like to share code
const messageID = await channel.send({ content: 'Some message' }).then(m => m.id)
possibly
Oh, thanks, yeah, forgot to put on hastebin, I did it with `` ^^
Original post :
Code https://hastebin.com/ujineqezoy.js
Everything is in title, if you need further information ask
I tried to work with Async/await but still not getting