Skip to content

Commit

Permalink
Merge pull request #107 from AmiyaBot/dev-shards
Browse files Browse the repository at this point in the history
update: 更新频道适配器
  • Loading branch information
vivien8261 authored Aug 8, 2024
2 parents a944b2e + f87bf91 commit fdebdc6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion amiyabot/adapters/tencent/qqGroup/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion amiyabot/adapters/tencent/qqGuild/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion amiyabot/builtin/messageChain/element.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit fdebdc6

Please sign in to comment.