Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
mongooseError: El almacenamiento en búfer de la operación `chatbots.findOne()` se agotó después de 10000 ms en el tiempo de espera. <anónimo>

Estaba haciendo el bot de discord del tutorial de youtube https://youtu.be/bD75JNQfeYM pero el tipo que hizo el tutorial de youtube no quiere responder a mi pregunta, recibí un error que dice

Error: el almacenamiento en búfer de la operación chatbots.findOne() se agotó después de 10000 ms en Timeout.x

aquí está el código esto es chatbot.js

 const fetch = require('node-fetch'); const client = require('../index'); const { findOne } = require('../models/chatbot'); const Schema = require('../models/chatbot'); client.on('messageCreate', async (message) => { if (message.author.bot) return await Schema.findOne({ guild: message.guild.id }, async (err, data) => { if (!data) return; if (err) throw err; const channell = data.channel if (message.channel.id === channell) { fetch(`https://api.monkedev.com/fun/chat?msg=${message.content}&uid=${message.author.id}&yr0n57JXpCy7aXlzFmMchuas`) .then(response => response.json()) .then(data => { message.reply(`> ${data.response}`) }) } }) })

y este es el comando para chatbot

 const { Client, Message, MessageEmbed } = require('discord.js'); const Schema = require('../../models/chatbot') module.exports = { name: 'set-chatbot', /* * @param {Client} client * @param {Message} message * @param {String[]} args */ run: async (client, message, args, Discord) => { const channell = message.mentions.channels.first() if (!channell) return message.reply('Please tell me a channel!'); Schema.findOne({ guild: message.guild.id }, async (err, data) => { if (data) data.delete() new Schema({ guild: message.guild.id, channel: channell.id, }).save(); message.channel.send('Done!') }) } }

esta mangosta

 const { mongooseConnectionString } = require("../config.json"); const mongoose = require("mongoose"); module.exports = () => { if (!mongooseConnectionString) return; mongoose.connect(mongooseConnectionString, { useFindAndModify: true, useUnifiedTopology: true, }); };

modelos

 const mongoose = require('mongoose') const chatbot = new mongoose.Schema({ guild: String, channel: String }) module.exports = mongoose.model("chatbot", chatbot);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!