NoneBot 暗语
Project description
📖 介绍
NoneBot2 暗语消息支持
[!IMPORTANT] 收藏项目,你将从 GitHub 上无延迟地接收所有发布通知~⭐️
Star History
💿 安装
以下提到的方法任选 其一 即可
[推荐] 使用 nb-cli 安装
在 Bot 的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-argot
使用包管理器安装
pip install nonebot-plugin-argot
# or, use poetry
poetry add nonebot-plugin-argot
# or, use pdm
pdm add nonebot-plugin-argot
# or, use uv
uv add nonebot-plugin-argot
🎉 使用
本插件基于 plugin-alconna,为 NoneBot 提供了一个新的消息段 Argot
@dataclass
class Argot(Segment):
name: str
segment: str | Segment | list[Segment]
command: str | Literal[False] | None = field(default=None, kw_only=True)
expired_at: int | timedelta = field(default_factory=timedelta, kw_only=True)
name: 暗语名称segment: 暗语包含的消息段command: 触发暗语的指令(跟随COMMAND_START配置)None: 使用name作为指令名False: 禁止通过指令获取暗语
expired_at: 过期时间
可以通过 on_argot 监听暗语事件
@on_argot("name")
async def _(event: ArgotEvent):
...
示例:👉 传送门
📸 效果图
💖 鸣谢
KiramiBot:灵感来源KomoriDev/Starify:提供了引人注目的徽章
贡献者们
感谢这些大佬对本项目作出的贡献:
📄 许可证
本项目使用 MIT 许可证开源
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_argot-0.1.9.tar.gz.
File metadata
- Download URL: nonebot_plugin_argot-0.1.9.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba0d6d1ebd3bc192e8e26dcf48a4e78f93cfc30943e8a6f37bf9992a49ec2cba
|
|
| MD5 |
916f1522bb871ee7dd7e60c9e0ef3ed4
|
|
| BLAKE2b-256 |
3c8376973d25e558e4f4775173b92c2fb193833c087f6d2a9252103cfcfda79e
|
File details
Details for the file nonebot_plugin_argot-0.1.9-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_argot-0.1.9-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e7b719bde8c966ca5a6ceaf8a94f49332b97ed7d48003e830d9ed41ce2179a0
|
|
| MD5 |
5de816e08c4443cd7a7f61cb4b207da8
|
|
| BLAKE2b-256 |
e8b571e664125f26ef654be6ac9d1a1594dda1b03b3e1376057757fac5da1c03
|