mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-26 03:44:58 +08:00
Merge pull request #725 from RockChinQ/feat/aiocqhttp-access-token
Feat: aiocqhttp支持access-token
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user