Add qbt function
This commit is contained in:
parent
ae8005b7e9
commit
43e823b1ec
|
@ -158,4 +158,5 @@ def unknown(message):
|
||||||
else:
|
else:
|
||||||
bot.reply_to(message,'Этот бот запривачен, гнида, блять')
|
bot.reply_to(message,'Этот бот запривачен, гнида, блять')
|
||||||
|
|
||||||
|
func.qbt()
|
||||||
bot.polling()
|
bot.polling()
|
||||||
|
|
12
func.py
12
func.py
|
@ -4,6 +4,18 @@
|
||||||
import db, os
|
import db, os
|
||||||
from db import *
|
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):
|
def u_auth(id,passwd):
|
||||||
list = []
|
list = []
|
||||||
if db.check('obj',AUTH_FILE):
|
if db.check('obj',AUTH_FILE):
|
||||||
|
|
Reference in New Issue