How to create and use custom middleware? #1023
Answered
by
bukhalo
Zhuravlev1
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
bukhalo
Dec 19, 2022
Replies: 2 comments 4 replies
-
Hey @Zhuravlev1, |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Zhuravlev1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Zhuravlev1,
middlewares
it just array of middleware functions inTelegraf
module options. Inside the module, we simply take and callbot.use()
for each element of the array. In this case, middleware has no Nest dependencies, because they exist outside Nest DI/Ioc.