1
0

upstart bot

This commit is contained in:
andrea
2025-07-26 18:38:40 +02:00
parent 56e5e35b53
commit 11e4f9b2dd
2 changed files with 7 additions and 3 deletions

6
bot.py
View File

@@ -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