2

Does Skype4py use the Skype Desktop API? That API appears to have been (or is being) removed by Microsoft1.

Does anybody know how this affects the skype4py project?


1 "What is the Desktop API?" on the Skype FAQ says:

As communicated in this blog post, due to technology improvements we are making to the Skype experience, some features of the API will stop working with Skype for desktop. For example, delivery of chat messages using the API will cease to work.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92

1 Answers1

0

Skype4py still work, but, when sending message to group chat, attention is necessary.

If Group chat is "cloud-based chats", Skype4py do not work well.

for reference: Skype FAQ - What are chat commands and roles?

For example, the following scripts work normally:

# -*- coding: utf-8 -*-
import Skype4Py

user = 'username' # Allow chats from Skype4py bot account

skype = Skype4Py.Skype(Transport='x11')
skype.Attach()

chat = skype.CreateChatWith(user)
chat.SendMessage('hello!')

And the following scripts work well too:

# -*- coding: utf-8 -*-
import Skype4Py

# p2p-based chat and Skype4py bot account had already joined group
group = '#botname/$username;1234567890abcdef'

skype = Skype4Py.Skype(Transport='x11')
skype.Attach()

for chat in skype.Chats :
    if chat.Name == group :
        chat.SendMessage('hello!')

But, the following scripts don't work :

# -*- coding: utf-8 -*-
import Skype4Py

# cloud-based chat and Skype4py bot account had already joined group
group = '19:1234567890abcdef1234567890abcdef@thread.skype'

skype = Skype4Py.Skype(Transport='x11')
skype.Attach()

for chat in skype.Chats :
    if chat.Name == group :
        chat.SendMessage('hello!')

The reasons are as follow.

  • Skype4py cannot handle cloud-based chats well.

In the evidence, the following scripts shows only p2p-based chats. Even if Skpe4py joined any cloud-based chats.

# -*- coding: utf-8 -*-
import Skype4Py

skype = Skype4Py.Skype(Transport='x11')
skype.Attach()
for chat in skype.Chats :
    print chat

# Sample Output:
# <Skype4Py.chat.Chat with Name='#username/$1234567890abcdef'>
# <Skype4Py.chat.Chat with Name='#botname/$username;1234567890abcdef'>
ie4
  • 51
  • 2