gpt4 book ai didi

C# - Skype 自动接受联系人请求

转载 作者:太空宇宙 更新时间:2023-11-03 13:56:10 24 4
gpt4 key购买 nike

所以我目前正在开发 Skype 机器人,我希望它可以自动接受联系请求,这样我就不必手动完成,知道怎么做吗?

在我研究的过程中,我发现了这个

ichat.AcceptAdd();

知道这是做什么用的吗?

最佳答案

我不知道我是否明白你想要完成的事情..

您想自动接受联系请求吗?真的吗?您喜欢成为黑客、垃圾邮件发送者等的目标吗? :)

无论如何,如果这是你想要做的,你可以订阅 UserAuthorizationRequestReceived 事件:

var events = (_ISkypeEvents_Event) _skype;
events.UserAuthorizationRequestReceived += UserAuthorizationRequestReceived;
try
{
_skype.Attach(8);
}
catch(COMException ce)
{
RaiseErrorEvent("Unable to attach to skype.", ce);
}


private void UserAuthorizationRequestReceived(SKYPE4COMLib.User puser)
{
if (do some user check here?? )
{
puser.IsAuthorized = true;
}
}

希望这对您有所帮助。

关于C# - Skype 自动接受联系人请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12114147/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com