Skip to content

Tag: node.js

How can I send an code block in discord.js embed?

I am trying to send an embed with a codeblock. In discord a code block is set with three ` What can I do to put oldMessage.cleanContent and newMessage.cleanContent in a code block? Here is my code: Answer You can do it in two ways both are correct: You just comment the comma with quotation Or you can comment …

Async/await in Nodejs + Mongoose

I’m new to Promises and async/await programming and I am not sure I am getting it straight. I am creating an API in Nodejs, with Express, Mongoose and MongoDB. I have seen a lot of tutorials on how to deal with asynchronicity but all of them are about NodeJs projects where the routing and the DB query a…