更改qq机器人的群名片,内置多种有趣名片
Project description
📖简介
通过定时任务更改bot(s)所在群自己的群名片
🔐许可
💿 安装方法
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-rename
pip
pip install nonebot-plugin-rename
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_rename"]
[tool.nonebot]
plugins = []
plugin_dirs = ["src/plugins"]
🏷️插件命令
使用方法 | 命令概述 |
---|---|
设置群名片 序号 | 设置群名片 序号(需空格,可带多个序号) |
查看群名片列表 | 查看当前支持的所有群名片列表的图片 |
查看当前群名片 | 查看当前群名片的设置 |
立即更改群名片 序号 | 立即更改当前群组bot名片,后面仅可跟一个序号(bot无返回值) |
删除群名片 | 删除当前群组群名片 |
设置所有群名片 | 为当前机器人所在所有群设置群名片,仅限超管私聊 |
⚙️插件配置项
配置项 | 描述 | 类型 |
---|---|---|
set_group_card_hour | 间隔时间(小时) | int |
set_group_card_minute | 间隔时间(分钟) | int |
use_nickname_front | 是否在群名片前加上bot名称 | bool |
self_name | 自定义前缀(需开启上一个配置) | str |
is_one_bot_set_all_group_card | 是否允许与bot会话可以设置所有群名片 | bool |
请注意不要将两个间隔时间都设为0!!!!!!
由于qq群名片特殊性,间隔太短可能意义并不大反而容易导致风控,建议在30分钟以上
🎉目前已实现的群名片功能
一图流
时间
-- 高考时间 -- 原神版本剩余时间 -- 北京时间 -- 古代计时制时间
热搜
-- B站热搜 -- 微博热搜 -- 抖音热搜 -- 百度热搜 -- 知乎热搜 -- 今日头条热搜
一言
-- 每日(次)一言
系统状态
-- 系统内存和cpu信息 -- Bot收发消息汇总
🧐PR需知
PS:由于本人代码比较烂,很多方法实现都比较复杂,所以对pr不是很友好,如果有更好的方法欢迎pr并指正
群名片的生成代码在/card/文件夹内,每种群名片(或者每类)对应一个文件
当新增一个新的群名片样式时,需要在以下几个地方进行修改相应代码使得其生效
- 在
/card/__init__.py
内导入你的包 - 在
/utils/card_name.py
内的card_list
按照格式新增你的文件名和对应的描述以及导包
🔥鸣谢
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
Close
Hashes for nonebot_plugin_rename-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3921ef7cb3428f252f74cf40099374df7964a3dc2713d061c2450a884c92e4ca |
|
MD5 | 4dead8b5a0d37c590a05c81149f4cc73 |
|
BLAKE2b-256 | 59e6b2c1dbd3286e831a1c0560c2aa29fa0b9e12fd23bec17d211f5a7e987405 |
Close
Hashes for nonebot_plugin_rename-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34bf3b4fc3c6fce73b8f09e1f01e17102a8d243612100eef60e866cc7c1ef676 |
|
MD5 | e6ba5f90fb19a7bad072fb4e61900950 |
|
BLAKE2b-256 | 3b59b3b31aad9b3a533325c0e02d2c85db751e12e6d7839bd0bc6ff4f0d7d5f7 |