diff --git a/bot.py b/bot.py index 7ca49a0..d21096e 100644 --- a/bot.py +++ b/bot.py @@ -37,10 +37,10 @@ async def update_bot(update, context): chat_id = update.effective_chat.id if update.message.chat.id not in _botsyms.SUPER_USERS: return print(f'update_bot: user {chat_id} not allowed') print(f'update_bot: {chat_id} bot is updating...') - os.system('cd ~/repo/battle_royale_sim; git pull') - os.system('systemctl --user start battle_royale.service') - update.message.reply_text('Bot aggiornato e riavviato!') + _os.system(f'cd {_botsyms.BOT_PATH}; git pull') + _os.system('systemctl --user start battle_royale.service') print(f'update_bot: {chat_id} bot successfully updated') + await update.message.reply_text('Bot aggiornato e riavviato!') async def bot_commands(update, context): text= update.message.text diff --git a/bot_libs/syms.py b/bot_libs/syms.py index 2582d4d..feff504 100644 --- a/bot_libs/syms.py +++ b/bot_libs/syms.py @@ -1,6 +1,10 @@ from local_settings import TOKEN as _token +from local_settings import BOT_PATH as _bot_path +from local_settings import SUPER_USERS as _superusers TOKEN= _token +BOT_PATH= _bot_path +SUPER_USERS= _superusers START_MSG= """Benvenuto nel crudele mondo di Battle Royal Simulator, La tua avventura e quella dei tuoi compagni inizia qui.