a send msg tools
Project description
📖 介绍
让连接的每个bot发送消息,如无好友或群则跳过
💿 安装
使用 pip 安装
pip install nonebot-plugin-sendmsg-by-bots
使用 conda 安装
conda install nonebot-plugin-sendmsg-by-bots
🎉 使用
指令表
from nonebot_plugin_sendmsg_by_bots import tools
# 发送群消息(能发都发):
await tools.send_group_msg_by_bots(group_id: int,node_msg: Message|MessageSegment|str)
# 发送群消息(只发成功一次)(self_id 可选,选了之后指定哪个id的bot账号发送):
await tools.send_group_msg_by_bots_once(group_id: int,node_msg: Message|MessageSegment|str,self_id: Optional[str] = None)
# 发送群合并消息(能发都发):
await tools.send_group_forward_msg_by_bots(group_id: int,node_msg: list)
# 发送群合并消息(一次收手):
await tools.send_group_forward_msg_by_bots_once(group_id: int,node_msg: list,self_id: Optional[str] = None)
# 发送私聊消息(能发都发):
await tools.send_private_msg_by_bots(user_id: int,msg: Message|MessageSegment|str)
# 发送私聊消息(只发成功一次收手):
await tools.send_private_msg_by_bots_once(user_id: int,msg: Message|MessageSegment|str,self_id: Optional[str] = None)
# 发送私聊合并消息(能发都发):
await tools.send_private_forward_msg_by_bots(user_id: int,msg: list)
# 发送私聊合并消息(一次收手):
await tools.send_private_forward_msg_by_bots_once(user_id: int,msg: lis,self_id: Optional[str] = Nonet)
# 被动回复消息,以拉格兰md形式发送
await tools.send_text2md(text: str):
# group_id : 群号
# user_id : 好友qq号
# node_msg : 合并转发消息列表
# msg : 消息
# 发送成功会返回True,否则会返回False
# 从所有bot的群列表检索群信息
# 未检索到会返回 {"group_name":"未获取到群名","group_id":group_id}
group_info = await tools.get_all_group_info(group_id:int)
# 从所有bot的群列表检索群成员列表
member_list = await get_group_member_list(group_id: int)
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
File details
Details for the file nonebot-plugin-sendmsg-by-bots-0.1.6.tar.gz
.
File metadata
- Download URL: nonebot-plugin-sendmsg-by-bots-0.1.6.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e250903ac5d39c16589de0a6f44d9258a78f065b4037aa0b8e0cfb687f0b55eb |
|
MD5 | 6ab312d396b07b62ce07ed6d18ae1d5e |
|
BLAKE2b-256 | 3a6e95a31ba9817fbff1979d28b239971bb482e16fb5b99864e575cd1bdb874f |
File details
Details for the file nonebot_plugin_sendmsg_by_bots-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_sendmsg_by_bots-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0622396da5add7692f153fd2a027df7fbf3c335d0dc5cf7492bcb6904aecad51 |
|
MD5 | 8716c9bb74378b7506356c7ec170e7fd |
|
BLAKE2b-256 | 71fd9774cdd96a40a80b6b71743b3046a1ed5904d5711f124acbd13d8a92d0be |