轻量化的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.1.tar.gz
(33.6 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.1.tar.gz.
File metadata
- Download URL: eridanus_dep-0.1.1.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ae52c8200be65fb9dfd30dc1d19eb3afebc7a9a7d3291abcd5e6a77d0fc254
|
|
| MD5 |
ecac3801da51f708ff33edfa6bc2bd8e
|
|
| BLAKE2b-256 |
cca8ce0dfb86b2b6f5e40ceee7df2234397f0615fdec8c3cd6ba1f9bb625bd80
|
File details
Details for the file eridanus_dep-0.1.1-py3-none-any.whl.
File metadata
- Download URL: eridanus_dep-0.1.1-py3-none-any.whl
- Upload date:
- Size: 37.7 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 |
aa933024046d53c20f00926ce9ac0f769b1e0dd9a9eebf8221d0ba207aa12dd7
|
|
| MD5 |
b7e36801bd34ff86fc27752bee80e90b
|
|
| BLAKE2b-256 |
bc268d8a75fa6837ce7b0a48aac8ed238a99d5618d488e598bf6ecc326338bca
|