* fix: qq official

* fix: appid
This commit is contained in:
Guanchao Wang
2025-10-07 00:06:07 +08:00
committed by GitHub
parent d664039e54
commit 0ab366fcac

View File

@@ -139,19 +139,15 @@ class QQOfficialAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter
event_converter: QQOfficialEventConverter = QQOfficialEventConverter() event_converter: QQOfficialEventConverter = QQOfficialEventConverter()
def __init__(self, config: dict, logger: EventLogger): def __init__(self, config: dict, logger: EventLogger):
self.config = config bot = QQOfficialClient(
self.logger = logger app_id=config['appid'], secret=config['secret'], token=config['token'], logger=logger
)
required_keys = [ super().__init__(
'appid', config=config,
'secret', logger=logger,
] bot=bot,
missing_keys = [key for key in required_keys if key not in config] bot_account_id=config['appid'],
if missing_keys:
raise command_errors.ParamNotEnoughError('QQ官方机器人缺少相关配置项请查看文档或联系管理员')
self.bot = QQOfficialClient(
app_id=config['appid'], secret=config['secret'], token=config['token'], logger=self.logger
) )
async def reply_message( async def reply_message(