I need to edit the last message from bot. But I don't know how get ID of last sended messade. This code
bot.hears('hi', async (ctx) =>{
try{
await ctx.reply('hello')
ctx.editMessageText(ctx.from.id, ctx.from.message.id, "second text")
}catch(e){
console.log(e)
}
})
give me this result:
TypeError: Telegraf: "editMessageText" isn't available for "message"