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.2.0.tar.gz (4.6 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.2.0.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-sendmsg-by-bots-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8757e4846315bdb2fc84f1d6cbb53daff559c9fc16d6f1d387de9b6925c520d5
MD5 9fb70a94596186289cd7fac98ac799f4
BLAKE2b-256 96850c17b0b1ea7485c40342161f18eb9964fe1dfddccf3bdc34d434ca7e01a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_sendmsg_by_bots-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28a7678656a987f6624547391010d1fd70cb9a7108877fdfc347acbda87c0311
MD5 9a1451f2c453b3d539e18e89a80b896d
BLAKE2b-256 2fafb6864c475ee25967b1000103efc2d150e8a00cbd16a693e86d1920a5b032

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