Some custom middleware might register properties on the context object that Telegraf is not aware of.Ĭonsequently, you can change the type of ctx to fit your needs in order for you to have proper TypeScript types for your data. The exact shape of ctx can vary based on the installed middleware. While most types of Telegraf's API surface are self-explanatory, there's some notable things to keep in mind. Moreover, it includes types for the complete Telegram API via the typegram package. Telegraf is written in TypeScript and therefore ships with declaration files for the entire library. like session and Scenes, extend the context by mutating ctx before await next(),. like Composer and Router, await next() for updates you don't wish to handle,.One of the key features of Telegram Desktop is its focus on security and privacy. extract information from updates and then await next() to avoid disrupting other middleware, Telegram Desktop is a messaging application that allows users to communicate with others in a secure and efficient manner.Telegram Desktop offers a fast and secure way to communicate with friends, family, and colleagues.launch ( ) // Enable graceful stop process. on ( message ( 'text' ), ( ctx ) => ctx.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |