轻量化的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.4.tar.gz
(33.9 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.4.tar.gz.
File metadata
- Download URL: eridanus_dep-0.1.4.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3e0054a5fc4925d9fefb70bc4c50cf49cdf700e958d3c693edbdafe15ac601
|
|
| MD5 |
49a3ec137fdc568b0f3888c41bc2689d
|
|
| BLAKE2b-256 |
cbee372b6cd49922b4f96525fbd28b7ccc8e7f8019261bd41bf31b81d6e40e66
|
File details
Details for the file eridanus_dep-0.1.4-py3-none-any.whl.
File metadata
- Download URL: eridanus_dep-0.1.4-py3-none-any.whl
- Upload date:
- Size: 38.0 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 |
04d651c4b86687bce2881f1d05962f724877b4ec0ffb70338bfcaee1505c6057
|
|
| MD5 |
f5a1128c9ad6cac45a9b3e3fdc9aec5e
|
|
| BLAKE2b-256 |
d0ecc1d5234bbc9c90abcab58e3f8991ed1466903b4c10536199ad8db797efd6
|