当我创建一个组并添加一个新成员时(新添加的成员的编号是用于登录yowsup的号码),我想向所有成员发送一个通知,说“Hello!”。这个回复应该是自动的。我该怎么做?在
我在demos/cli文件中添加了一个函数/图层.py在
def createGroupMessage(self, groupID,messageBody):
groupID = groupID + "@g.us"
outgoingMessageProtocolEntity = TextMessageProtocolEntity(
messageBody,
to = groupID
)
print outgoingMessageProtocolEntity
self.toLower(outgoingMessageProtocolEntity)
我试图在文件层/protocolentities/notification\u groups中调用它_创建.py 完成必要的导入后:
^{pr2}$虽然代码没有出错,但当我添加yowsup号码时,我没有收到任何消息。在
我得到的输出是:
Message:
ID: 1442859669-5
To: 919xxxxxx515-1442843444@g.us
Type: text
Timestamp: 1442859669
Body: Hello !!
Printing notification..
w:gp2
Notification: Notification
From: 919xxxxxx515-1442843444@g.us
Type: w:gp2
Participant: 919xxxxxx515@s.whatsapp.net
Creator: 919xxxxxx515@s.whatsapp.net
Create type: None
Creation timestamp: 1442843444
Subject: FBI
Subject owner: 919xxxxxx515@s.whatsapp.net
Subject timestamp: 1442843444
Participants: {'919xxxxxx515@s.whatsapp.net': 'admin', '91886xxxxx5@s.whatsapp.net': None}
请告诉我我哪里出错了,或者我该怎么解决这个问题? 谢谢!在
目前没有回答
相关问题 更多 >
编程相关推荐