feat: aiocqhttp支持access-token

This commit is contained in:
RockChinQ
2024-03-13 16:49:11 +08:00
parent 6a4ea5446a
commit d66577e6c3

View File

@@ -216,7 +216,11 @@ class AiocqhttpAdapter(adapter.MessageSourceAdapter):
self.ap = ap
self.bot = aiocqhttp.CQHttp()
if "access-token" in config and config["access-token"]:
self.bot = aiocqhttp.CQHttp(access_token=config["access-token"])
del self.config["access-token"]
else:
self.bot = aiocqhttp.CQHttp()
async def send_message(
self, target_type: str, target_id: str, message: mirai.MessageChain