-
Is it possible to override catch function for whole bot, not in every place I need it through injecting and redefining .catch()? |
Beta Was this translation helpful? Give feedback.
Answered by
evilsprut
Aug 24, 2022
Replies: 1 comment
-
You can get // main.ts
const bot = app.get(getBotToken());
bot.catch(e => console.error(e)); Also you can use ExeptionFilter's. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
evilsprut
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can get
Telegraf
instance anywhere in you app with@InjectBot()
decorator, or get it inmain.ts
:Also you can use ExeptionFilter's.