Answer the question
In order to leave comments, you need to log in
How to overwrite MongoDB discord.js collection?
Info.create({
rIMG: "ПЕРЕМЕННАЯ С КАРТИНКОЙ",
rTITLE: 'ПЕРЕМЕННАЯ С НАЗВАНИЕМ',
uID: message.author.id
})
Answer the question
In order to leave comments, you need to log in
What is not clear here?
let info = await Info.findOne({ uID: message.author.id }); // Получаем это из коллекции MongoDB
info.rIMG = "ссылка на картинку"; // Меняем.
info.save(); // Сохраняем
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question