Answer the question
In order to leave comments, you need to log in
How to get data from db to discord?
Hello.
Data output from the database to the discord on command.
const dbj = mongoclient.db("Data");
const col = dbj.collection("violats"); //раздел
const my = col.find({});
await message.reply(JSON.stringify(my));
//error:
{"_events":{},"_eventsCount":0}
Answer the question
In order to leave comments, you need to log in
my.toArray()
https://docs.mongodb.com/manual/reference/method/c...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question