예제 #1
0
def getMembersByGroupID(gID):
    if request.method == 'GET':
        return GroupHandler().getGroupMembersByGroupID(gID)
    if request.method == 'POST':
        return GroupHandler().addMember(gID, request.json)
    if request.method == 'DELETE':
        return GroupHandler().removeMember(gID, request.json)
예제 #2
0
def getGroup():
    if request.method == 'GET':
        return GroupHandler().getAllGroups()
    if request.method == 'POST':
        return GroupHandler().createGroup(request.json)
    if request.method == 'DELETE':
        return GroupHandler().deleteGroup(request.json)
예제 #3
0
async def GMHandler(app: Mirai, group: Group, member: Member,
                    message: MessageChain):
    if group.id not in groups:
        groups[group.id] = GroupHandler()
        TaskHandler(app, group.id)

    await groups[group.id].handle(app, group, member, message)
예제 #4
0
def getOwnerByGroupID(gID):
    return GroupHandler().getGroupOwnerByGroupID(gID)
예제 #5
0
def getGroupByID(gID):
    return GroupHandler().getGroupByGroupID(gID)