mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-12 06:55:58 +08:00
🐛 修复权限错误 (#477)
* 修复权限错误
* 🚨 `pre-commit-ci`修复格式错误
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a3d014c78d
commit
d3760972b2
@ -37,21 +37,16 @@ async def get_gs_msg(ev):
|
||||
] = None
|
||||
pm = 3
|
||||
|
||||
if priv.check_priv(ev, priv.ADMIN):
|
||||
if priv.check_priv(ev, priv.SUPERUSER):
|
||||
pm = 1
|
||||
elif priv.check_priv(ev, priv.ADMIN):
|
||||
pm = 2
|
||||
|
||||
if sp_bot_id:
|
||||
bot_id = sp_bot_id
|
||||
else:
|
||||
bot_id = 'onebot'
|
||||
|
||||
try:
|
||||
if ev.sender['role'] == 'owner' or ev.sender['role'] == 'admin':
|
||||
pm = 2
|
||||
except Exception as e:
|
||||
logger.warning(e)
|
||||
pm = 3
|
||||
|
||||
if ev.to_me:
|
||||
message.append(Message('at', self_id))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user