示例#1
0
def AddBotHelpListener(bcc: Broadcast):
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#帮助")
                                      ])(GroupHelpMessage)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#关于")
                                      ])(GroupAboutMessage)
def AddAnalyzeEventListener(bcc: Broadcast):
    bcc.receiver(GroupMessage, headless_decorators=[
                 strictPlainCommand("#解析复杂消息")])(AnalyzeGenerator(GroupMessage))
    bcc.receiver(FriendMessage, headless_decorators=[
                 strictPlainCommand("#解析复杂消息")])(AnalyzeGenerator(FriendMessage))
    bcc.receiver(TempMessage, headless_decorators=[
                 strictPlainCommand("#解析复杂消息")])(AnalyzeGenerator(TempMessage))
def AddGroupAdminListener(bcc: Broadcast):
    bcc.receiver("GroupMessage", headless_decorators=[strictPlainCommand("#添加管理员")])(
        GroupAddAdmin
    )
    bcc.receiver("GroupMessage", headless_decorators=[strictPlainCommand("#解除管理员")])(
        GroupRemoveAdmin
    )
    bcc.receiver("GroupMessage", headless_decorators=[strictPlainCommand("#当前管理员")])(
        GroupAvailableAdmin
    )
def AddGroupMuteMemberListener(bcc: Broadcast):
    bcc.receiver("GroupMessage")(GroupMuteMember)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#解除禁言")
                                      ])(GroupunmuteMember)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#全体禁言")
                                      ])(GroupMuteAll)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#解除全体禁言")
                                      ])(GroupUnMuteAll)
示例#5
0
def AddAppToUrlListener(bcc: Broadcast):
    bcc.receiver("GroupMessage")(AppToUrlAutoConvertGenerator(GroupMessage))
    bcc.receiver("FriendMessage")(AppToUrlAutoConvertGenerator(FriendMessage))
    bcc.receiver("TempMessage")(AppToUrlAutoConvertGenerator(TempMessage))
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#提取App链接")])(
                     MessageAppToUrlGenerator(GroupMessage))
    bcc.receiver("FriendMessage",
                 headless_decorators=[strictPlainCommand("#提取App链接")])(
                     MessageAppToUrlGenerator(FriendMessage))
    bcc.receiver("TempMessage",
                 headless_decorators=[strictPlainCommand("#提取App链接")
                                      ])(MessageAppToUrlGenerator(TempMessage))
def AddGroupBlockListListener(bcc: Broadcast):
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#警告")
                                      ])(GroupWarnMember)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#删除警告")
                                      ])(GroupCancelWarnMember)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#拉黑")
                                      ])(GroupBlockMember)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#解除拉黑")
                                      ])(GroupUnBlockMember)
def AddGroupAnswerListener(bcc: Broadcast):
    bcc.receiver("GroupMessage")(GroupAddAnswer)
    bcc.receiver("GroupMessage")(GroupDeleteAnswer)
    bcc.receiver("GroupMessage", headless_decorators=[strictPlainCommand("#可用进群答案")])(
        GroupAllowAnswer
    )
    bcc.receiver("MemberJoinRequestEvent")(MemberJoinRequest)
def AddMemberJoinEventListener(bcc: Broadcast) -> None:
    bcc.receiver("MemberJoinEvent")(GroupMemberJoin)
    bcc.receiver("GroupMessage",
                 headless_decorators=[startWith("#更新入群词")
                                      ])(GroupUpdateMemberJoinMessage)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#当前入群词")
                                      ])(GroupNowMemberJoinMessage)
def AddGroupSentenceListener(bcc: Broadcast):
    bcc.receiver("GroupMessage",
                 headless_decorators=[startWith("#添加群语录")])(GroupAddSentence)
    bcc.receiver("GroupMessage")(GroupShowSentence)
    bcc.receiver("GroupMessage")(GroupDeleteSentence)
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#随机语录")
                                      ])(GroupRandomSentence)
示例#10
0
def AddRecallMessageListener(bcc: Broadcast):
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#撤回")
                                      ])(GroupRecallOtherMessage)
示例#11
0
def AddGroupSleepListener(bcc: Broadcast) -> None:
    bcc.receiver("GroupMessage",
                 headless_decorators=[strictPlainCommand("#睡眠套餐")
                                      ])(Group_Member_Sleep)