Send messages to Skype “group” chat from .NET?

前端 未结 1 1376
北恋
北恋 2021-02-07 08:03

Is there an easy way to send group chat messages to Skype from .NET? I don\'t need to respond to any commands or anything, so it doesn\'t need to be a BOT. Basically, I would

相关标签:
1条回答
  • 2021-02-07 08:12

    The currently available Skype API for Windows uses WM_COPYDATA to exchange text-based commands for controlling Skype (see the Public API Reference download). There is a new thing called SkypeKit in development but it's a closed beta so I don't know what it will do to enhance the experience.

    There appear to have been a few projects here and there that have wrapped the existing public API with some .NET-based calls using C#. These either wrap the basic level messaging system or the COM wrapper, Skype4COM (as you have already seen). A Google search gave me these results that seem to get you started:

    • Controlling Skype with C#
    • How to do Skype in C#
    • C# Example Project for Skype4COM

    Based on your experiences, I would look at the first item in this list as it appears to be a directly interacting with the Windows messages (i.e. WM_COPYDATA) rather than Skype4COM.

    Sending a chat message to a group
    Assuming you utilise the C# wrappers referenced above, here is a rough idea of the commands you'll need from the public API in order to send a chat message to a group.

    The command to start a chat is CHAT CREATE. It appears from the documentation that you have to specify each recipient (or target, as the written in the API reference) individually. Whether this can be a group name or not is not made clear, however, the GET GROUP USERS command enables you to obtain the individual users within a specific group.

    Once you have a chat, you can use the CHATMESSAGE command to actually post a message.

    0 讨论(0)
提交回复
热议问题