Skip to content

How to create and use custom middleware? #1023

Answered by evilsprut
Zhuravlev1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Zhuravlev1, middlewares it just array of middleware functions in Telegraf module options. Inside the module, we simply take and call bot.use() for each element of the array. In this case, middleware has no Nest dependencies, because they exist outside Nest DI/Ioc.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Zhuravlev1
Comment options

@evilsprut
Comment options

@evilsprut
Comment options

@evilsprut
Comment options

Answer selected by Zhuravlev1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants