Update parser.py
This commit is contained in:
parent
78da7c0bd3
commit
4c407fd1b1
1 changed files with 9 additions and 0 deletions
|
@ -118,6 +118,15 @@ async def parser(kwargs: dict):
|
|||
os.execl(python, python, *sys.argv)
|
||||
else:
|
||||
await sendMessage(kwargs, '权限不足')
|
||||
elif command_first_word == 'update':
|
||||
if database.check_superuser(kwargs):
|
||||
await sendMessage(kwargs, '你确定吗?')
|
||||
confirm = await wait_confirm(kwargs)
|
||||
if confirm:
|
||||
result = os.popen('git pull', 'r')
|
||||
await sendMessage(kwargs, result.read())
|
||||
else:
|
||||
await sendMessage(kwargs, '权限不足')
|
||||
# 正则模块部分
|
||||
if Group in kwargs:
|
||||
for regex in regex_list: # 遍历正则模块列表
|
||||
|
|
Reference in a new issue