G
G
Gatzee2021-08-09 15:14:00
Node.js
Gatzee, 2021-08-09 15:14:00

How to solve an error when entering a command?

Hello everyone, in general, I have a VK game bot, and there is a distribution command and when I enter it, everyone writes that the distribution has begun, and I need to repost a new post in the group, but the post does not appear and the log gives such an error

Handle polling update error: ReferenceError: time is not defined
at Array. (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\dodji.js:2534:83)
at C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\dodji.js:250: 18
at C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\lib\index.js:7251:15
at nextDispatch (C:\Users\Inferno\Documents\GitHub\dodji- bot-vk\node_modules\middleware-io\lib\index.js:52:40)
at Updates.stackMiddleware (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\middleware-io\lib\ index.js:58:16)
at Updates.dispatchMiddleware (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\lib\index.js:7427:21)
at Updates.handleWebhookUpdate (C:\Users\Inferno\ Documents\GitHub\dodji-bot-vk\node_modules\vk-io\lib\index.js:7355:21)
at C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\ lib\index.js:6864:28
at Array.forEach ()
at PollingTransport.fetchUpdates (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\lib\index.js:6862 :24)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async PollingTransport.startFetchLoop (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\lib\index .js:6794:17)
(node:43104) UnhandledPromiseRejectionWarning: APIError: Code #901 - Can't send messages for users without permission
at API.callMethod (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\ lib\index.js:828:39)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
( node:43104 ) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (seehttps://nodejs.org/api/cli.html#cli_unhandled_reje... ). (rejection id: 2)
(node:43104) [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:43104) UnhandledPromiseRejectionWarning: APIError: Code #901 - Can't send messages for users without permission
at API.callMethod (C:\Users\Inferno\Documents\GitHub\dodji-bot-vk\node_modules\vk-io\ lib\index.js:828:39)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
( node:43104) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_reje... ). (rejection id: 3)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question