I have been trying to develop a command for a Discord bot using NodeJs through Visual Studio Code. The command basically calculates your “weight” just by taking a random number from 1 to 1000. I wanted the bot to be able to memorize that number and return it if the person uses the command more than once. I really have no idea how to pull data from the database and return it through a message. Here is what I have so far in the code.
First of all, @horman_coax, welcome to the MongoDB Community Forums! We’re lucky to have you here!
Second, let’s focus on the MongoDB aspect of this problem. Looks like you have commented out the code that interfaces with MongoDB. Could you please share what error you get when you run the code? Thank you!