jehy / telegram-test-api

Simple implimentation of telegram API which can be used for testing telegram bots
MIT License
98 stars 24 forks source link

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

Open Phoscur opened 11 months ago

Phoscur commented 11 months ago

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 commented 11 months ago

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