Skip to main content

OSUbot in NoneBot2

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-osubot

✨ NoneBot osubot ✨

license pypi python

📖 介绍

本项目修改自osuv2,适配了nonebot2,并且在此之上修改了命令的响应逻辑并修改了一些bug使之更易于使用,可能与其他使用了tortoise-orm的插件会相冲突如harukabot

变速功能依赖ffmpeg,需要自行安装ffmpeg才能正常使用

💿 安装

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

打开 nonebot2 项目的 bot.py 文件, 在其中写入

nonebot.load_plugin('nonebot_plugin_osubot')
从 github 安装 在 nonebot2 项目的插件目录下, 打开命令行, 输入以下命令克隆此储存库
git clone https://github.com/yaowan233/nonebot-plugin-osubot.git

修改nonebot_plugin_osubot的__init__.py

add_model('src.plugins.database.models')

打开 nonebot2 项目的 bot.py 文件, 在其中写入

nonebot.load_plugin('src.plugins.nonebot_plugin_osubot')

⚙️ 配置

你需要至OSU个人设置申请新的OAuth应用,然后将得到的客户端ID与客户端密钥填入nonebot2 项目的.env文件中

配置说明

配置项 必填 默认值 说明
OSU_CLIENT 客户端ID
OSU_KEY 客户端密钥
OSZ_MIRROR 0 0-2分别代表sayo,kitsu,chimu的镜像下载
DB_URL sqlite://db.sqlite3 数据库地址
INFO_BG ['https://api.ghser.com/random/pe.php'] 随机背景api地址

🎉 使用

指令

image

💡 贡献

由于当前开发缺乏测试,欢迎提各种issue来反馈bug 或者你可以加群(228986744)来直接反馈! 1665504476458_temp_qrcode_share_9993

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

nonebot-plugin-osubot-2.0.0.post1.tar.gz (29.7 MB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_osubot-2.0.0.post1-py3-none-any.whl (29.8 MB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-osubot-2.0.0.post1.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-osubot-2.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 e18dec4767e8028dc496f6fde15617f3f3da0dad2e635b8a7c54aec4b54365b3
MD5 5eb35f8d2f6b31902069845e98da24c1
BLAKE2b-256 c01af41f6609d1f9777247872ab4d73c4b10fcb8055d47e0a6521a266acb04a0

See more details on using hashes here.

File details

Details for the file nonebot_plugin_osubot-2.0.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_osubot-2.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f398647f9f1eca425e20a10e2d073b40d0b56703cee45ceb05e80400bfbca5a
MD5 9aa88f2b7253082166ea6c7c2d4d6c7c
BLAKE2b-256 602326910fb746fecd6739c2c157e61433d6cca40429e7be48afc51d3aec939b

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