File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 11import os
2+
23from telegram .ext import Application , MessageHandler , filters
4+ import sentry_sdk
5+
36from pycamp_bot .commands import auth
47from pycamp_bot .commands import voting
58from pycamp_bot .commands import manage_pycamp
1316from pycamp_bot .models import models_db_connection
1417from pycamp_bot .logger import logger
1518
19+
20+ SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'
21+ if SENTRY_DATA_SOURCE_NAME_ENVVAR in os .environ :
22+ sentry_sdk .init (dsn = os .environ [SENTRY_DATA_SOURCE_NAME_ENVVAR ])
23+
24+
1625async def unknown_command (update , context ):
1726 text = "No reconozco el comando, para ver comandos válidos usá /ayuda"
1827 await context .bot .send_message (chat_id = update .message .chat_id , text = text )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ dependencies = [
99 " munch==4.0.0" ,
1010 " python-telegram-bot==21.3" ,
1111 " peewee==3.17.5" ,
12+ " sentry-sdk==2.6.0" ,
1213]
1314requires-python = " ==3.10.*"
1415authors = [
You can’t perform that action at this time.
0 commit comments