在Skype4Py上接受好友请求

2024-03-29 06:09:02 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能帮我用Skype4Py自动接受好友请求吗? 现在我在用

def UserAuthorizationRequestReceived(user):
    user.IsAuthorized = true

以及

^{pr2}$

但似乎没用 谢谢!在

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


Tags: 文档truehttpdocnetdefhtmlsourceforge
1条回答
网友
1楼 · 发布于 2024-03-29 06:09:02

来自the documentation for ^{}

  1. C{On...} properties.

    This method lets you use any callables as event handlers. Simply assign them to C{On...} properties (where "C{...}" is the name of the event) of the object whose events you are interested in. For example::

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

您需要将函数附加到skype.OnUserAuthorizationRequestReceived。在

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

相关问题 更多 >