Sending Embeds in correct order.

My bot is reading a file line by line and sending embeds with timestamps it gathers out of the file. Each channel.send() is awaited, but it seems to still not post in the correct order when it sends the messages in the channel.
20 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
SSmith
SSmithOP3y ago
SSmith
SSmithOP3y ago
Then rl has if/else statements depending on the line Wait, I may know the issue Here's an example, I thought connected would've caused duplicate issues, but as long as if(){}else if() {} works the way I believe it does, it should be fine.
SSmith
SSmithOP3y ago
Here's a prime example: Both of these lines go through the same code, but the time on the first message is after the second.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
SSmith
SSmithOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
SSmith
SSmithOP3y ago
If that was the case the whole thing wouldn't work That doesn't happen with every message
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
SSmith
SSmithOP3y ago
That helped the times. Thanks, now I have fields on an embed that aren't showing up when the message is sent though.
SSmith
SSmithOP3y ago
SSmith
SSmithOP3y ago
SSmith
SSmithOP3y ago
This is it + the fields in the terminal before it sends
SSmith
SSmithOP3y ago
Then it comes into discord like this:
SSmith
SSmithOP3y ago
It prints in the console when it adds fields and when it sends
SSmith
SSmithOP3y ago
SSmith
SSmithOP3y ago
Its sending after it adds fields..
SSmith
SSmithOP3y ago
Same way, just not async
SSmith
SSmithOP3y ago
Outer scope
SSmith
SSmithOP3y ago
I could probably use let, would it make a difference? Could I make it a const if the fields & title could change multiple times? I found the issue Well I changed a few things, not entirely certain which one caused the issue, but changed a lot of vars to let, but what I think was causing it was after I sent the embed, I set the fields to [] again. It was a redundant set to empty anyways since I do it in a line prior anyways. Thanks for the help mate @qjuh Do I just close the post, what's the typical action after?
Want results from more Discord servers?
Add your server