Open sarah278 opened 1 year ago
to get rid of this:
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated. In the future, you will have to enable it yourself. See https://github.com/yagop/node-telegram-bot-api/issues/319. internal/modules/cjs/loader.js:778:30
first line in index.js must contain:
process.env.NTBA_FIX_319 = 1;
Hello, i cant get your bot up and working.
After reading i found out i need a mongodb, easy is always running. After editing .env DB_HOST and ENCRYPT_KEY mongo shows me connections and the bot reports Interesting... but after a short while this will happen:
npm start
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated. In the future, you will have to enable it yourself. See https://github.com/yagop/node-telegram-bot-api/issues/319. internal/modules/cjs/loader.js:778:30 Hi! I'm Pluto - v0.2.0 Okay, let's see what I've learnt... Interesting... (node:3693) UnhandledPromiseRejectionWarning: MongoError: command find requires authentication at MessageStream.messageHandler (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/connection.js:268:20) at MessageStream.emit (events.js:198:13) at processIncomingData (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/message_stream.js:144:12) at MessageStream._write (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/message_stream.js:42:5) at doWrite (_stream_writable.js:415:12) at writeOrBuffer (_stream_writable.js:399:5) at MessageStream.Writable.write (_stream_writable.js:299:11) at Socket.ondata (_stream_readable.js:710:20) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) (node:3693) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:3693) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:3693) UnhandledPromiseRejectionWarning: MongoError: command find requires authentication at MessageStream.messageHandler (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/connection.js:268:20) at MessageStream.emit (events.js:198:13) at processIncomingData (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/message_stream.js:144:12) at MessageStream._write (/home/sarah/pluto-markov-telegram-bot/node_modules/mongodb/lib/cmap/message_stream.js:42:5) at doWrite (_stream_writable.js:415:12) at writeOrBuffer (_stream_writable.js:399:5) at MessageStream.Writable.write (_stream_writable.js:299:11) at Socket.ondata (_stream_readable.js:710:20) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) (node:3693) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
and nothing happend. this happens with docker (node alpine image v14 and v19) and in windows wsl2 with ubuntu lts. mongodb wont create the db, my mongouri should contain user/pass@ip:port/db (bsp: mongodb://root:secretpass@10.10.10.1:27017/botname),with hardcode in mongo-connector.js no connection to db allowed.
is there something else what i can do to get it up and running, im not a programmer to solve this by my self