Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Youfou
wxpy
Commits
aa78a59e
Commit
aa78a59e
authored
8 years ago
by
Youfou
Browse files
Options
Download
Email Patches
Plain Diff
update doc
parent
04d19645
master
develop
github/fork/Imccccc/master
github/fork/bobolau/master
github/fork/bugrevelio/master
github/fork/chenbotao828/new-core
github/fork/haiya512/master
github/fork/hanx11/develop
github/fork/mashihua/patch-1
new-core
0.3.9.8
0.3.9.7
0.3.9.6
0.3.9.5
0.3.9
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wxpy/api/messages/message.py
+22
-0
wxpy/api/messages/message.py
with
22 additions
and
0 deletions
+22
-0
wxpy/api/messages/message.py
+
22
-
0
View file @
aa78a59e
...
...
@@ -222,6 +222,28 @@ class Message(object):
:param str suffix: 转发时增加的 **后缀** 文本,原消息为文本时会自动换行
:param bool raise_for_unsupported:
| 为 True 时,将为不支持的消息类型抛出 `NotImplementedError` 异常
例如,将公司群中的老板消息转发出来::
from wxpy import *
bot = Bot()
# 定位公司群
company_group = ensure_one(bot.groups().search('公司微信群'))
# 定位老板
boss = ensure_one(company_group.search('老板大名'))
# 将老板的消息转发到文件传输助手
@bot.register(company_group)
def forward_boss_message(msg):
if msg.member == boss:
msg.forward(bot.file_helper, prefix='老板发言')
# 堵塞线程
embed()
"""
def
wrapped_send
(
send_type
,
*
args
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment