Skip to main content

Amiya-Bot

PyPI

简洁高效的 Python 异步渐进式 QQ 频道机器人框架!
可使用内置的适配器创建 KOOK、mirai-api-http、go-cqhttp、ComWeChat Client 以及支持 OneBot v11/12 的机器人实现。

官方文档:www.amiyabot.com

Install

pip install amiyabot

Get started

Single mode

import asyncio

from amiyabot import AmiyaBot, Message, Chain

bot = AmiyaBot(appid='******', token='******')


@bot.on_message(keywords='hello')
async def _(data: Message):
    return Chain(data).text(f'hello, {data.nickname}')


asyncio.run(bot.start())

Multiple mode

import asyncio

from amiyabot import MultipleAccounts, AmiyaBot, Message, Chain

bots = MultipleAccounts(
    AmiyaBot(appid='******', token='******'),
    AmiyaBot(appid='******', token='******'),
    ...
)


@bots.on_message(keywords='hello')
async def _(data: Message):
    return Chain(data).text(f'hello, {data.nickname}')


asyncio.run(bots.start())

Use adapter

import asyncio

from amiyabot import AmiyaBot, Message, Chain
from amiyabot.adapters.onebot.v11 import onebot11

bot = AmiyaBot(
    appid='******',
    token='******',
    adapter=onebot11(host='127.0.0.1', http_port=8080, ws_port=8060)
)


@bot.on_message(keywords='hello')
async def _(data: Message):
    return Chain(data).text(f'hello, {data.nickname}')


asyncio.run(bot.start())

Get more

Release files for amiyabot-core-test 1.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for amiyabot-core-test 1.8.5
File Interpreter ABI Platform
amiyabot_core_test-1.8.5-108-py3-none-any.whl Python 3 none any Details

Release files / amiyabot_core_test-1.8.5-108-py3-none-any.whl

Download URL amiyabot_core_test-1.8.5-108-py3-none-any.whl
Size 11.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8dd9067c4d3368b33bc67df0a9620268c47ae4948c616a90229df08b64e4969d
BLAKE2b-256 checksum
How to use checksums
ba7b73d02ec698f4717d20d07ef4ba5e7f4307a4d02c29bd8ef9a24b67d919e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

1.8.5 This release

1 release file

0.0.5

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page