telegram-test-api icon indicating copy to clipboard operation
telegram-test-api copied to clipboard

sendChatAction("typing") - TelegramError: 500: Internal Server Error

Open Phoscur opened this issue 2 years ago • 1 comments

When I add await to this command

ctx.sendChatAction("typing");

My tests start failing with:

TelegramError: 500: Internal Server Error
    at Telegram.callApi (.\node_modules\telegraf\lib\core\network\client.js:288:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async .\bot\telegrafCommandTest.spec.js:35:7
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\telegraf\lib\composer.js:486:21
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async execute (.\node_modules\telegraf\lib\composer.js:485:17)
    at async .\node_modules\p-timeout\index.js:50:13 {
  response: { error_code: 500, description: 'Internal Server Error' },
  on: {
    method: 'sendChatAction',
    payload: { chat_id: 1, action: 'typing', message_thread_id: undefined }
  }
}

Is this unsupported?

Phoscur avatar Dec 19 '23 21:12 Phoscur

Oh I see, this could be solved by merging https://github.com/jehy/telegram-test-api/pull/51/commits/24b7a553f79d81b6a8807cef8c9fd30fb3c3e95b I'll try that fork then!

Edit: hum it's pretty outdated ... better merge this somehow... https://github.com/jehy/telegram-test-api/pull/51

Phoscur avatar Dec 22 '23 19:12 Phoscur