This commit is contained in:
ultimateplayer1999 2023-04-26 08:34:25 +00:00
parent fe5985c665
commit da1866915b

View File

@ -24,21 +24,6 @@ client.on("ready", () => {
client.user.setStatus('dnd') client.user.setStatus('dnd')
}); });
// client.once("ready", () => {
// // ensure that the bot stats document exists
// const wolfcount = new Wolfcount({
// count: 0,
// validation: "count"
// });
// wolfcount.save().then(() => {
// console.log('Count document saved successfully into the database!');
// }).catch(err => {
// console.log('Error while saving the count document', err);
// });
// });
// Error handling // Error handling
client.on("error", (error) => { client.on("error", (error) => {
console.error("Something went wrong:", error); console.error("Something went wrong:", error);
@ -48,7 +33,7 @@ client.on("error", (error) => {
const wolfChars = ['w', 'o', 'l', 'f']; const wolfChars = ['w', 'o', 'l', 'f'];
// Find a document by validation // Find a document by validation
Wolfcount.findOne({ validation: 'count' }).then((countdocument) => { Wolfcount.findOne({ validation: 'wolfcount' }).then((countdocument) => {
console.log(countdocument); console.log(countdocument);
}).catch((error) => { }).catch((error) => {
console.error(error); console.error(error);
@ -83,7 +68,7 @@ client.on("messageCreate", (message) => {
}).catch((error) => { }).catch((error) => {
console.error(error); console.error(error);
}); });
// }) // })
// Wolfcount.findByIdAndUpdate("6447da87681fd1bc486a4923", {count: newcount}, function(err, result){ // Wolfcount.findByIdAndUpdate("6447da87681fd1bc486a4923", {count: newcount}, function(err, result){
// if(err){ // if(err){