Skip to main content

Nonebot2 Support for LiteyukiBot

Project description

NoneBotPluginLogo

liteyukibot-plugin-nonebot

✨ 为轻雪机器人提供NoneBot支持 ✨

license pypi python

📖 介绍

一个简单的 liteyukibot 插件,可以为你的机器人提供 NoneBot 支持,有一定NoneBot基础即可从原有的NoneBot迁移到轻雪

💿 安装

使用 pip 安装 在 轻雪 项目的根目录下打开命令行, 输入以下指令即可安装
pip install liteyukibot-plugin-nonebot
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install liteyukibot-plugin-nonebot
pdm
pdm add liteyukibot-plugin-nonebot
poetry
poetry add liteyukibot-plugin-nonebot
conda
conda install liteyukibot-plugin-nonebot

🎉 使用

仅运行此插件(开发测试)

运行入口文件

python main.py

或自行通过开发工具运行

from liteyuki.dev.plugin import run_plugins

if __name__ == "__main__":
    run_plugins("liteyukibot_plugin_nonebot")

装载到机器人程式运行(生产环境)

在轻雪配置文件中添加如下结构配置其一,使轻雪知晓应加载此插件

扁平化配置项(推荐在少量配置时使用)

liteyuki.plugins: [ ..., "liteyukibot_plugin_nonebot" ]

普通配置项(在主要配置文件中使用)

liteyuki:
  plugins:
    ...
    - liteyukibot_plugin_nonebot

此插件默认装载nonebot-adapter-onebot适配器和fastapihttpxwebsockets三个常用驱动器,可根据需求进行配置或二次分发使用

安装其他NoneBot商店推荐使用轻雪的NoneBot插件npm

⚙️ 配置

参考LiteyukiBot的配置文档,在config下新建配置文件nonebot.yml/toml/json(你可自行命名),填入如下结构配置文件,这里使用yaml

nonebot:
  host: 127.0.0.1 # 监听地址,外部访问请设置为0.0.0.0
  port: 8080  # 自定义端口
  command_start: [ "", "/" ]  # 命令前缀
  superusers: [ "0000" ]  # 你的用户id
  nickname: [ "liteyuki" ]  # 你的机器人昵称

liteyuki:
  reload: true # 轻雪开发模式 运行时重载 启用后修改nonebot插件后可重载插件

ℹ️ 其他

  • 目前该插件已内置在轻雪机器人应用中,无需单独安装

  • 如果你是基于轻雪框架二次开发,需要手动安装

  • 该插件仍然有许多内容需要完善,欢迎各位的建议及贡献

  • 感谢NoneBot提供的框架支持

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

liteyukibot_plugin_nonebot-0.1.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file liteyukibot_plugin_nonebot-0.1.3.tar.gz.

File metadata

  • Download URL: liteyukibot_plugin_nonebot-0.1.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.18.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for liteyukibot_plugin_nonebot-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f5dd7ea783d7ffdb161c6e766e67964963e2e1ed15d74a4f78c432630946e2a7
MD5 304df03fb00948164f5b64ed81a76a5f
BLAKE2b-256 0712cbe932b2dc876fbb0000d4164fcfe94c6c983cb518f916ec9bbad8cb73fc

See more details on using hashes here.

File details

Details for the file liteyukibot_plugin_nonebot-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for liteyukibot_plugin_nonebot-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eced9192e4763424d3c4eef3a562e9a1a14184f8b7a4492afd706fcd8bdca550
MD5 1a37a4d0d4db2bd6112b4b00e3523155
BLAKE2b-256 54fd6da7522bfcd65690b675a79267cc2dd3497854eb449a410b5ee36aa9af78

See more details on using hashes here.

Supported by

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