【问题标题】:Accept friend request on Skype4Py在 Skype4Py 上接受好友请求
【发布时间】:2013-11-12 08:57:37
【问题描述】:

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

def UserAuthorizationRequestReceived(user):
    user.IsAuthorized = true

skype.UserAuthorizationRequestReceived = UserAuthorizationRequestReceived

但它似乎不起作用 谢谢!

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

【问题讨论】:

    标签: python skype skype4py


    【解决方案1】:

    来自the documentation for 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

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

    【讨论】:

    • @AndrewWong 不,您附加到skype.UserAuthorizationRequestReceived,而不是skype.OnUserAuthorizationRequestReceived
    猜你喜欢
    • 1970-01-01
    • 2014-12-01
    • 1970-01-01
    • 2020-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多