CodingTrain / Discord-Bot-Examples

Bot Examples for Fall 2023
18 stars 6 forks source link

Update dotenv config import in bot.js #15

Closed supercrafter100 closed 11 months ago

supercrafter100 commented 11 months ago

To address this pr comment, I overlooked this file and originally assumed it was updated here too. Hence why it wasn't included in my original #13 pull request

dipamsen commented 11 months ago

I am thinking if we should instead use dotenv.config() everywhere (because that's what is shown in the video). Is there a preferred way to do this? (I don't think so)

supercrafter100 commented 11 months ago

Usually destructuring is preferred for memory usage as you're only storing what you strictly want in the variable instead of the entirety of what dotenv exports.

shiffman commented 11 months ago

I don't mind if the video is slightly different, I can always add code comments here with further explanation. Feel free to help annotate if you like! Will merge for now. @supercrafter100 are you in the coding train discord?

supercrafter100 commented 11 months ago

I am yeah. Username is the same as my GitHub name.