Skip to main content

Let bot look!!!

Project description

NoneBotPluginLogo

NoneBotPluginText

NoneBot-Plugin-AreUSleepy

✨基于 sleepy-project/sleepy 项目的状态查询插件! ✨

python3 License

📖 介绍

此插件可以发送在 sleepy-project/sleepy 目前的状态信息,可以显示用户的设备是否在使用中,正在听的歌曲 (支持情况以 sleepy 项目为准),支持多设备状态列表

💿 安装

以下提到的方法 任选其一即可

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

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入

[tool.nonebot]
plugins = [
    # ...
    "nonebot_plugin_areusleepy"
]

⚙️ 配置

env 配置示例,变量后面为默认配置:

# 基本配置
sleepy_command="aresleepy"    # 触发命令
sleepy_prompt_loading=true # 是否在发送消息前显示 "正在获取, 请稍候"
sleepy_show_details=false  # 是否显示详细信息 (状态的 id, 设备的 id, 最后更新时间的时区)

# Sleepy 服务配置
sleepy_url="https://status.0d000721.xin" # Sleepy 服务地址, 必须以 http:// 或 https:// 开头, 不以 / 结尾
sleepy_timeout=5.0                       # 请求超时 (秒)
sleepy_retries=3                         # 重试次数

# sleepy 定时任务配置
sleepy_scheduler_enabled=False  # 是否启用定时任务
sleepy_scheduler_cron="0 9,21 * * *"  # Cron 表达式,默认每天 9:00 和 21:00
sleepy_scheduler_groups:""  # 推送的群组列表,默认为空,开启定时任务后必须配置此项

🎉 使用

用法:

  • /sleepy - 查询配置中网站的在线状态
  • /sleepy [url] - 查询其他网站的在线状态
    • 如: /sleepy https://sleepy.wyf9.top
    • 注意: url 必须以 http://https:// 开头

效果图

兄弟你睡了吗喵!!!!!!

📞 联系

Sleepy 项目

QQ 群组: 点此加群 Discord: 点此加入服务器 更多联系方式

人较多, 请注明来意

本项目

TG群组:点此加入 QQ群:1049319982 作者邮箱:congyu@sbhfy.cn

大概率没人

💡 鸣谢

本项目基于 sleepy-project/sleepy: Are you sleeping?

感谢 Sleepy 开发者 wyf9 重构插件

📝 更新日志

0.1.0

重构插件

0.1.2

添加了定时任务

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

nonebot_plugin_areusleepy-0.1.5.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_areusleepy-0.1.5-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_areusleepy-0.1.5.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.3 Windows/11

File hashes

Hashes for nonebot_plugin_areusleepy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6e45237e9b6fb298d5206de16ce88d5099019b8fbce1491eca4a99cb3cfa8bf2
MD5 75059ef91b0f24f40fe58542a7d49d49
BLAKE2b-256 703e7a513af5948922eb40834f02687c95804bc9179c9657443cbf50f0d192d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_areusleepy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 12c9bdde9d715848c3d648ec84e6f3c839f4b1003323e395d03010b731558f5a
MD5 c1fd59bd12a70a98dfb25d3e58a4d5b5
BLAKE2b-256 c2d7f2c1bf54b8e56178d24626c9be4a80be565ff922b9bc9d92b6046b0f28d3

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