mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-14 22:40:59 +00:00
feat: 应用cmdpriv时忽略不存在的命令
This commit is contained in:
@@ -327,6 +327,10 @@ def apply_privileges():
|
|||||||
for path, priv in data.items():
|
for path, priv in data.items():
|
||||||
if path == 'comment':
|
if path == 'comment':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if path not in __command_list__:
|
||||||
|
continue
|
||||||
|
|
||||||
if __command_list__[path]['privilege'] != priv:
|
if __command_list__[path]['privilege'] != priv:
|
||||||
logging.debug('应用权限: {} -> {}(default: {})'.format(path, priv, __command_list__[path]['privilege']))
|
logging.debug('应用权限: {} -> {}(default: {})'.format(path, priv, __command_list__[path]['privilege']))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user