Skip to content

HarcicYang/HyperBotCore

Repository files navigation

banner

HypeR Core

适配 OneBot v11 协议,目标多协议、功能模块化、易于扩展、高效的 QQ 机器人框架

OneBot V11 GPL-3.0 Pypi

概览

HypeR Core 是一个基于 Python asyncio 的 OneBot v11 机器人框架,提供简洁的事件系统、消息构建器和类型安全的 API 响应。

English Documentation 中文文档


安装

pip install hyper-bot

开发和构建使用 uv

git clone https://github.com/HarcicYang/HypeR_Bot
cd HyperBotCore
uv sync

文档

简单示例

import asyncio
import hyperot

hyperot.init()

from hyperot import Client
from hyperot.events import GroupMessageEvent, PrivateMessageEvent
from hyperot.common import Message
from hyperot.segments import *

async def handler(event, actions):
    if str(event.message) == ".ping":
        await actions.send_msg(
            f"pong! HypeR Core {hyperot.HYPER_BOT_VERSION}",
            group_id=event.group_id,
            user_id=event.user_id
        )

with Client() as cli:
    cli.subscribe(handler, [GroupMessageEvent, PrivateMessageEvent])
    asyncio.get_event_loop().run_until_complete(cli.run())

许可

GPL-3.0 License

About

适配OneBot v11、功能模块化、易于配置、稳定高效的QQ Bot

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages