Add qbt function
This commit is contained in:
parent
ae8005b7e9
commit
43e823b1ec
|
@ -158,4 +158,5 @@ def unknown(message):
|
|||
else:
|
||||
bot.reply_to(message,'Этот бот запривачен, гнида, блять')
|
||||
|
||||
func.qbt()
|
||||
bot.polling()
|
||||
|
|
12
func.py
12
func.py
|
@ -4,6 +4,18 @@
|
|||
import db, os
|
||||
from db import *
|
||||
|
||||
def qbt():
|
||||
url = os.environ['QURL']
|
||||
username = os.environ['QUSER']
|
||||
password = os.environ['QPASS']
|
||||
commands = [
|
||||
f"qbt settings set url {url}",
|
||||
f"qbt settings set username {username}",
|
||||
f"echo {password} | qbt settings set password --no-warn"
|
||||
]
|
||||
for command in commands:
|
||||
os.system(f"bash -c '{command}'")
|
||||
|
||||
def u_auth(id,passwd):
|
||||
list = []
|
||||
if db.check('obj',AUTH_FILE):
|
||||
|
|
Reference in New Issue