mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-18 11:44:18 +00:00
refactor: remove legacy config files (#1294)
This commit is contained in:
committed by
GitHub
parent
edc7f81486
commit
c8f331675c
@@ -23,7 +23,7 @@ class CommandHandler(handler.MessageHandler):
|
||||
|
||||
privilege = 1
|
||||
|
||||
if f'{query.launcher_type.value}_{query.launcher_id}' in self.ap.system_cfg.data['admin-sessions']:
|
||||
if f'{query.launcher_type.value}_{query.launcher_id}' in self.ap.instance_config.data['admins']:
|
||||
privilege = 2
|
||||
|
||||
spt = command_text.split(' ')
|
||||
|
||||
@@ -42,7 +42,7 @@ class Processor(stage.PipelineStage):
|
||||
self.ap.logger.info(f"处理 {query.launcher_type.value}_{query.launcher_id} 的请求({query.query_id}): {message_text}")
|
||||
|
||||
async def generator():
|
||||
cmd_prefix = self.ap.command_cfg.data['command-prefix']
|
||||
cmd_prefix = self.ap.instance_config.data['command']['prefix']
|
||||
|
||||
if any(message_text.startswith(prefix) for prefix in cmd_prefix):
|
||||
async for result in self.cmd_handler.handle(query):
|
||||
|
||||
Reference in New Issue
Block a user