telegramtelegram-botnode-telegram-bot-api

Send schedule message to telegram channel by bot telegram API nodejs


In order to send a regular message I use -

const uri = `https://api.telegram.org/bot${token}/sendMessage?chat_id=${channelId}&text=${text}`;

await fetch(uri);

But how to send a schedule message?


Solution

  • Bots can't schedule messages, there is corresponding error in docs: https://core.telegram.org/method/messages.sendMessage (see SCHEDULE_BOT_NOT_ALLOWED)

    so only option is to plan sending with any scheduling tool on your side