Python 异步渐进式机器人框架
Project description
Amiya-Bot
简洁高效的 Python 异步渐进式 QQ 机器人框架!
现已支持:
官方文档:www.amiyabot.com
Install
pip install amiyabot
Get started
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())
多账户
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())
使用适配器
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amiyabot-2.0.5-847-py3-none-any.whl.
File metadata
- Download URL: amiyabot-2.0.5-847-py3-none-any.whl
- Upload date:
- Size: 11.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b78ea7aab4a04bd0762c3bf0821efe664106b8222eea67a995047451092b3084
|
|
| MD5 |
08690914b66e3d5883c9b39a012043cf
|
|
| BLAKE2b-256 |
91b95030bfc14264e9e64fdb72b3d89d87030200169335dc1a574b75cab1e358
|
Provenance
The following attestation bundles were made for amiyabot-2.0.5-847-py3-none-any.whl:
Publisher:
pypi.yml on AmiyaBot/Amiya-Bot-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amiyabot-2.0.5-847-py3-none-any.whl -
Subject digest:
b78ea7aab4a04bd0762c3bf0821efe664106b8222eea67a995047451092b3084 - Sigstore transparency entry: 201136980
- Sigstore integration time:
-
Permalink:
AmiyaBot/Amiya-Bot-core@5bd2377dd78247500726d117918d074cf6de4bf1 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/AmiyaBot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@5bd2377dd78247500726d117918d074cf6de4bf1 -
Trigger Event:
push
-
Statement type: