我尝试运行脚本来响应个人和群组聊天,但它只响应个人聊天
import Skype4Py
def commands(Message, Status):
if Status == 'SENT' or Status == 'RECEIVED':
if Message.Body == "ping":
cmd_ping(Message)
else:
pass
else:
pass
def cmd_ping(Message):
Message.Chat.SendMessage('pong')
print "Ping Command Received n"
skype = Skype4Py.Skype();
skype.OnMessageStatus = commands
skype.Attach();
while True:
raw_input('')
我假设您已经在新版本的Skype中创建了聊天。
请尝试以下解决方案:创建P2P聊天(通过任何群组或个人聊天中的/createmoderatedchat
)。我们在项目中遇到了同样的问题,所以你可以参考我们的维基页面。