4

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?

Andrii Abramov
  • 10,019
  • 9
  • 74
  • 96
SirGrey
  • 43
  • 1
  • 3

1 Answers1

4

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

crystalbit
  • 664
  • 2
  • 9
  • 19