Skip to main content

轻量化的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()

文档

Eridanus文档

Project details


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.5.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eridanus_dep-0.1.5-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file eridanus_dep-0.1.5.tar.gz.

File metadata

  • Download URL: eridanus_dep-0.1.5.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.0

File hashes

Hashes for eridanus_dep-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1314fd79c7e03d97b79c4387711f41d87c7bc4499992083372ca45514dfe6298
MD5 68bc1ca4871a91d7fa59a8616e4e1462
BLAKE2b-256 c117f3373f9ffa4c2ab6bbc4428dc717fd43713e4645745d064ef4dddc93b93f

See more details on using hashes here.

File details

Details for the file eridanus_dep-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: eridanus_dep-0.1.5-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

Hashes for eridanus_dep-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 369039dc0b2924ce24e3e1c963a4813823118642e72d8d0ddc13d26fec97cd05
MD5 971ca776ac96445b2e7b10d8f481b47f
BLAKE2b-256 3fab2c75e7d812d7c89ed4d86fa4410521646e2981a1608f5a31aa5215b4befc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page