轻量化的onebot v11 sdk
Project description
介绍
eridanus-dep是一个轻量化的onebot v11 sdk,整体风格参考了yirimirai
Eridanus是基于eridanus-dep开发的onebot应用,你可以通过参考Eridanus的源码来了解eridanus-dep的使用方法。
安装
pip install eridanus-dep
或
pip install --upgrade eridanus-dep
需要开启onebot实现的正向ws端口3001,access_token留空不要设置。
示例
from Eridanus.adapters.websocket_adapter import WebSocketBot
from Eridanus.event.events import GroupMessageEvent
bot = WebSocketBot('ws://127.0.0.1:3001',all_str_id=False)
#由于不同Onebot实现消息id有用int的(napcat/llob),也有用str的(Lagrange),因此提供all_str_id选项,在发送前自动处理id
#bot = WebSocketBot('ws://127.0.0.1:3001',blocked_loggers=["DEBUG", "INFO_MSG"]) #像这样屏蔽指定logger
@bot.on(GroupMessageEvent)
async def _(event: GroupMessageEvent):
print(event)
await bot.send(event, 'Hello, world!')
bot.run()
文档
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 Distribution
eridanus_dep-0.1.2.tar.gz
(33.7 kB
view details)
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 eridanus_dep-0.1.2.tar.gz.
File metadata
- Download URL: eridanus_dep-0.1.2.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7de3c2f2d712208740127a2d4b6379fc4505ed46b2072eb2ded5ca54b3acd451
|
|
| MD5 |
ff79582aacc4661b7f0c34352ea889ca
|
|
| BLAKE2b-256 |
e980749971836566b0de3a16207150031231dc7390c52b0b1570a3258a25fae8
|
File details
Details for the file eridanus_dep-0.1.2-py3-none-any.whl.
File metadata
- Download URL: eridanus_dep-0.1.2-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5c32b0ba6b6eefea7ee0bffd6a7a0f6e038fa5f9a1de6a45ed11455e03adce
|
|
| MD5 |
dd7eaf7cab0b1f9827f06b2ab58e34fe
|
|
| BLAKE2b-256 |
5bf6fb80cb997fd7c980582ae878ae2790e8c02e405402805716d31317051102
|