diff --git a/amiyabot/adapters/tencent/qqGroup/builder.py b/amiyabot/adapters/tencent/qqGroup/builder.py index ffa4ece..ff7dbc9 100644 --- a/amiyabot/adapters/tencent/qqGroup/builder.py +++ b/amiyabot/adapters/tencent/qqGroup/builder.py @@ -3,7 +3,7 @@ from graiax import silkcoder from contextlib import contextmanager -from dataclasses import asdict, field +from dataclasses import dataclass, asdict, field from amiyabot.util import create_dir, get_public_ip, random_code from amiyabot.adapters import MessageCallback from amiyabot.network.httpServer import HttpServer diff --git a/amiyabot/adapters/tencent/qqGuild/__init__.py b/amiyabot/adapters/tencent/qqGuild/__init__.py index 93a5423..380c059 100644 --- a/amiyabot/adapters/tencent/qqGuild/__init__.py +++ b/amiyabot/adapters/tencent/qqGuild/__init__.py @@ -16,8 +16,10 @@ from .builder import build_message_send, QQGuildMessageCallback -def qq_guild_shards(shard_index: int, shards: int): +def qq_guild_shards(shard_index: int, shards: int, sandbox: bool = False): def adapter(appid: str, token: str): + if sandbox: + return QQGuildSandboxBotInstance(appid, token, shard_index, shards) return QQGuildBotInstance(appid, token, shard_index, shards) return adapter diff --git a/amiyabot/builtin/messageChain/element.py b/amiyabot/builtin/messageChain/element.py index 5faa602..659bc05 100644 --- a/amiyabot/builtin/messageChain/element.py +++ b/amiyabot/builtin/messageChain/element.py @@ -1,8 +1,8 @@ import os import json -from dataclasses import dataclass from typing import List, Any +from dataclasses import dataclass from amiyabot.builtin.lib.browserService import * from amiyabot import log