File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,12 @@ def set_handlers(application):
3737 raffle .set_handlers (application )
3838 schedule .set_handlers (application )
3939 announcements .set_handlers (application )
40- # devtools.set_handlers(application)
40+ devtools .set_handlers (application )
4141 application .add_handler (MessageHandler (filters .COMMAND , unknown_command ))
4242
4343
4444if __name__ == '__main__' :
4545 logger .info ('Starting PyCamp Bot' )
46- # escribo environ para pruebas por no poder pasar kargs en consola windows
47- os .environ ['TOKEN' ] = '5265755654:AAGhJKGgIoaKAjxnq9pn113ec9CURGVGG2k'
4846
4947 if 'TOKEN' in os .environ .keys ():
5048 models_db_connection ()
Original file line number Diff line number Diff line change 44from pycamp_bot .logger import logger
55from pycamp_bot .utils import escape_markdown
66
7- PSW = '123456'
7+
88def get_admins_username ():
99 admins = []
1010 pycampistas = Pycampista .select ()
@@ -54,10 +54,8 @@ async def grant_admin(update, context):
5454 passwrd = parameters [1 ]
5555
5656 user = Pycampista .get_or_create (username = username , chat_id = chat_id )[0 ]
57- #if 'PYCAMP_BOT_MASTER_KEY' in os.environ.keys():
58- if True :
59- #if passwrd == os.environ['PYCAMP_BOT_MASTER_KEY']:
60- if passwrd == PSW :
57+ if 'PYCAMP_BOT_MASTER_KEY' in os .environ .keys ():
58+ if passwrd == os .environ ['PYCAMP_BOT_MASTER_KEY' ]:
6159 user .admin = True
6260 user .save ()
6361 rply_msg = 'Ahora tenes el poder. Cuidado!'
You can’t perform that action at this time.
0 commit comments