node-telegram-bot-api icon indicating copy to clipboard operation
node-telegram-bot-api copied to clipboard

How to use schedule_date flag in sendMessage

Open qertis opened this issue 1 year ago • 2 comments

Question

Hello. How can the schedule_date flag from the official documentation https://core.telegram.org/method/messages.sendMessage be used in the bot.sendMessage method?

qertis avatar Jun 29 '24 16:06 qertis

This example doesn't working:

await bot.sendMessage(activity.target.id, 'result', {
    // todo - after 1 minutes
    schedule_date: Math.floor((new Date(new Date().getTime() + 1 * 60000)).getTime() / 1000),
  })

qertis avatar Jun 29 '24 16:06 qertis