node-telegram-bot-api
node-telegram-bot-api copied to clipboard
How to use schedule_date flag in sendMessage
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?
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),
})