Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chronocat red适配器对接 #15

Open
Ikaros-521 opened this issue Dec 24, 2023 · 0 comments
Open

chronocat red适配器对接 #15

Ikaros-521 opened this issue Dec 24, 2023 · 0 comments

Comments

@Ikaros-521
Copy link
Owner

try:
    # 尝试导入nonebot.adapters.onebot.v11
    from nonebot.adapters.onebot.v11 import Bot, Event
    from nonebot.adapters.onebot.v11 import Message, MessageSegment
    nonebot.logger.debug("Imported OneBot v11 adapter.")
except ImportError:
    # 如果导入失败,则尝试导入nonebot.adapters.red
    from nonebot.adapters.red import Bot
    from nonebot.adapters.red.event import Event
    from nonebot.adapters.red.message import Message, MessageSegment
    nonebot.logger.debug("Imported Red adapter.")

卸载v11,安装red适配器即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant