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.6.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.6-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_areusleepy-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 c8f441734325c31efa9a433229daa7569bd7c6e80b706893afe7a6fff1756e2d
MD5 9fa1df2b446dac4f168cbd4b66eccb8f
BLAKE2b-256 7f5a78ec878ecef106eba83dc53789d4213d7205a277768a7630d805c084a213

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_areusleepy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2ff2386de9301369767b20076de450d70bc9a6558219c31efc17f4593bb6afb9
MD5 a1bf61f3e1824dd7534fdc8f03722fa5
BLAKE2b-256 378e0ec06a5e5697c713e647344b55b05cf4f756460fd14732750cfd3676b9cd

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