forked from Cryz/battle_royale_sim
upstart bot
This commit is contained in:
6
bot.py
6
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
|
||||
|
||||
Reference in New Issue
Block a user