Current collected state Current
Observed since 20 Oct, 21:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
爱发电Bot SDK
一款轻量化,简单且易用的爱发电机器人库
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文档
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.4 | 23 Mar 2025 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d673fef73a0588fa856366dbdd93a652557a76ae7061a085dd99777e0886ab0b