AfdianBot-Core
一款轻量化,简单且易用的爱发电机器人库
快速入门
import AfdianBot
bot = AfdianBot.Bot(account="xxxxx", password="xxxx") # 填写账号密码
@bot.register("hello") # 注册一个指令
def hello(msg:AfdianBot.types.TextMsg):
sender_name = AfdianBot.api.get_user_info(msg.sender_id)['name']
bot.send_msg(f"hello {sender_name}!", msg.sender_id) # 回复消息至对方
# 在一般情况下,程序默认使用单线程模式,即一个一个处理回复
# 但在一些需要并发需求(即同时处理多个消息)情况时,你可以加上threded参数启用多线程模式
# bot.run(threded=True)
bot.run()
更多文档内容详见AfdianBot-Core文档
Metadata
Release files for AfdianBot 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| AfdianBot-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for AfdianBot-1.0.4-py3-none-any.whl |
Release files / AfdianBot-1.0.4-py3-none-any.whl
| Download URL | AfdianBot-1.0.4-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5eb3e3d1ff25c06e649518d1e3c277feae5cddf84e0ea8ddc1b536ede98c5f5c
|
|
BLAKE2b-256 checksum How to use checksums |
1dae6aa70c38326eef91147c83a263387a1e1dbf093e3eb3b118c2c8fcf7e125
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.10
|
Security for AfdianBot 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.