grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.24k stars 112 forks source link

How to use message_auto_delete_time #602

Closed cvmabilin closed 3 months ago

cvmabilin commented 3 months ago

Good day!

I would like to know how to use the message_auto_delete_time? I can't find any example if this will be a properties on a sendMessage or sendPhoto or other..

Im planning to set a auto delete timer on my bot messages (example is 1 hour). Since I find in the documentation about the auto delete timer: https://grammy.dev/ref/types/messageautodeletetimerchanged

I just don't know how I am going to use it.

Thank you so much.

KnorpelSenf commented 3 months ago

Bots cannot use this feature. If your bot wants to delete a message, you can call deleteMessage whenever you want. All that bots can do is to inspect the value that users gave to the auto delete timer.

The full list of features is here: https://core.telegram.org/bots/api

cvmabilin commented 3 months ago

@KnorpelSenf Understood. Thank you.