0

有人可以帮助我使用 Skype4Py 自动接受好友请求吗?现在我正在使用

def UserAuthorizationRequestReceived(user):
    user.IsAuthorized = true

skype.UserAuthorizationRequestReceived = UserAuthorizationRequestReceived

但它似乎没有工作谢谢!

(文档:http ://skype4py.sourceforge.net/doc/html/ )

4

1 回答 1

0

文档中Skype4Py::utils::EventHandlingBase

  1. C{On...} 属性。

    此方法允许您使用任何可调用对象作为事件处理程序。只需将它们分配给您对其事件感兴趣的对象的 C{On...} 属性(其中“C{...}”是事件的名称)。例如::

     import Skype4Py
    
     def user_status(Status):
         print 'The status of the user changed'
    
     skype = Skype4Py.Skype()
     skype.OnUserStatus = user_status
    

您需要将功能附加到skype.OnUserAuthorizationRequestReceived

希望您正在做一些检查以确保您的应用程序不会成为垃圾邮件攻击的目标,因为您正在接受所有请求。

于 2013-11-12T09:15:57.460 回答