{"id":38698345,"url":"https://github.com/shoucandanghehe/nonebot-plugin-wait-a-minute","last_synced_at":"2026-01-17T10:43:52.511Z","repository":{"id":253590414,"uuid":"843950661","full_name":"shoucandanghehe/nonebot-plugin-wait-a-minute","owner":"shoucandanghehe","description":"为 NoneBot2 实现了优雅关机（Graceful Shutdown）","archived":false,"fork":false,"pushed_at":"2025-12-22T18:31:07.000Z","size":289,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-24T06:44:24.254Z","etag":null,"topics":["graceful-shutdown","hook","nonebot2","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shoucandanghehe.png","metadata":{"files":{"readme":"README.en-US.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-17T23:06:22.000Z","updated_at":"2025-12-22T18:31:00.000Z","dependencies_parsed_at":"2024-11-18T19:22:40.809Z","dependency_job_id":"a82efbc9-c93b-45af-882a-1b7cd107ccbe","html_url":"https://github.com/shoucandanghehe/nonebot-plugin-wait-a-minute","commit_stats":null,"previous_names":["shoucandanghehe/nonebot-plugin-wait-a-minute"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shoucandanghehe/nonebot-plugin-wait-a-minute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoucandanghehe%2Fnonebot-plugin-wait-a-minute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoucandanghehe%2Fnonebot-plugin-wait-a-minute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoucandanghehe%2Fnonebot-plugin-wait-a-minute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoucandanghehe%2Fnonebot-plugin-wait-a-minute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoucandanghehe","download_url":"https://codeload.github.com/shoucandanghehe/nonebot-plugin-wait-a-minute/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoucandanghehe%2Fnonebot-plugin-wait-a-minute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graceful-shutdown","hook","nonebot2","python3"],"created_at":"2026-01-17T10:43:52.430Z","updated_at":"2026-01-17T10:43:52.490Z","avatar_url":"https://github.com/shoucandanghehe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD036 MD041  --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://v2.nonebot.dev/store\"\u003e\n    \u003cimg src=\"./img/NoneBotPlugin.png\" width=\"300\" alt=\"logo\" /\u003e\n  \u003c/a\u003e\n\n# Wait a Minute\n\n✨ A nonebot plugin for running some func before closing the bot ✨\n\n![Python](https://img.shields.io/badge/Python-3.9+-blue.svg)\n![PyPI - Version](https://img.shields.io/pypi/v/nonebot-plugin-wait-a-minute)\n[![pdm-managed](https://img.shields.io/endpoint?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fpdm-project%2F.github%2Fbadge.json)](https://pdm-project.org)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n---\n\n[简体中文](./README.md) | English\n\n\u003c/div\u003e\n\n## 🤔 What is this\n\nThis plugin implements graceful shutdown for NoneBot2 (see [nonebot/nonebot2#2479](https://github.com/nonebot/nonebot2/issues/2479))  \nIt waits for events to **finish processing** before shutdown  \nIt also allows you to run some functions before shutdown, similar to [`on_shutdown`](https://nonebot.dev/docs/advanced/runtime-hook#%E7%BB%88%E6%AD%A2%E5%A4%84%E7%90%86)  \nBut with higher priority, ensuring execution before `bot` disconnects\n\n## 💿 Installation\n\n### 🚀 Using uv\n\n```bash\nuv add nonebot-plugin-wait-a-minute\n```\n\n### 🚀 Using PDM\n\n```bash\npdm add nonebot-plugin-wait-a-minute\n```\n\n### 🚀 Using poetry\n\n```bash\npoetry add nonebot-plugin-wait-a-minute\n```\n\n## ♿️ How to use\n\n```python\nfrom nonebot import require, on_command\nfrom nonebot.matcher import Matcher\n\nrequire('nonebot_plugin_wait_a_minute') # require plugin\n\nfrom nonebot_plugin_wait_a_minute import graceful, on_shutdown_before\n\n# Graceful shutdown\n@on_command('foo').handle()\n@graceful()  # 👈 Add graceful decorator below the handle decorator\n# Or, you can use @graceful(block=True) to prevent new handles from running during shutdown wait\nasync def _(matcher: Matcher):\n    matcher.send('foo')\n\n# Pre-shutdown hook\n@on_shutdown_before\ndef _():\n    # Do something()\n    ...\n\n# Or use async\n@on_shutdown_before\nasync def _():\n    # await Do something()\n    ...\n```\n\n## 📄 LICENSE\n\nThis project is open-sourced under the [MIT](./LICENSE) license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoucandanghehe%2Fnonebot-plugin-wait-a-minute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoucandanghehe%2Fnonebot-plugin-wait-a-minute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoucandanghehe%2Fnonebot-plugin-wait-a-minute/lists"}