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="areusleepy"    # 触发命令
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 群组:点此加入

作者邮箱:congyu@sbhfy.cn

大概率没人

💡 鸣谢

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

感谢 Sleepy 开发者 wyf9 重构插件

📝 更新日志

0.1.8

将同步的 requests 替换为异步的 httpx, 支持并发使用

展开更多

0.1.2

添加了定时任务

0.1.0

重构插件

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.8.tar.gz (6.7 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.8-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_areusleepy-0.1.8.tar.gz
  • Upload date:
  • Size: 6.7 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.8.tar.gz
Algorithm Hash digest
SHA256 ebc57f22a67156e9eb3db0f8c0f8a29428092127071bb7a43ff722143b3264f8
MD5 f3c251663726b1e6cc47a4075bcbb839
BLAKE2b-256 21a73bc65709883235112216336ce71ce51b202b7628d8465e0957561474ae9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_areusleepy-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f1eeede5df94219723d34d8dfb74b1c30df6646501616336614405f137d9018a
MD5 f27250004778d5354b4a1e15ece6f6b8
BLAKE2b-256 b8c535437bd7fc1605c2a53c71b76978974f14197ec03a28902d08eccb274b61

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