Skip to main content

a send msg tools

Project description

x NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-sendmsg-by-bots

✨ NoneBot 多bot发送消息 ✨

license pypi python

📖 介绍

让连接的每个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
# 发送合并消息,超过200条会自动转多条发送

# 从所有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


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-sendmsg-by-bots-0.1.7.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file nonebot-plugin-sendmsg-by-bots-0.1.7.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-sendmsg-by-bots-0.1.7.tar.gz
Algorithm Hash digest
SHA256 407f5ccc1baea6d02a510e9ea83f81cbf0cf52a65bdbcd4470776ecbc6a35124
MD5 1ec17b0e43f50091e8e2c77ba2ec056a
BLAKE2b-256 95f71004fa534b536a3671e35dda21ffb9d7597e7e9f47bb7b45229cae662a1e

See more details on using hashes here.

File details

Details for the file nonebot_plugin_sendmsg_by_bots-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_sendmsg_by_bots-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b31485665af3b4b01f64e3e265385adeeb9d638677a4bd7e6ee474dd98bb64f0
MD5 58314622783db84c7fd8b2c21a51f6f1
BLAKE2b-256 de4e1ec09be64be08bf3ddf561adc5afdac3f32c76567a2a33a3017b198c4e7d

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