mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-19 02:46:09 +00: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.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(
|
async def send_message(
|
||||||
self, target_type: str, target_id: str, message: mirai.MessageChain
|
self, target_type: str, target_id: str, message: mirai.MessageChain
|
||||||
|
|||||||
Reference in New Issue
Block a user