示例#1
0
async def parse(bot: Bot, event: Event, state: T_State):
    args = str(event.get_plaintext()).strip().lower().split()
    if not args:
        await setu_import.reject('你似乎没有发送有效的参数呢QAQ, 请重新发送:')
    state[state["_current_key"]] = args[0]
    if state[state["_current_key"]] == '取消':
        await setu_import.finish('操作已取消')
示例#2
0
async def handle_first_receive(bot: Bot, event: Event, state: T_State):
    args = str(event.get_plaintext()).strip().lower().split()
    if not args:
        pass
    elif args and len(args) == 1:
        state['mode'] = args[0]
    else:
        await setu_import.finish('参数错误QAQ')
示例#3
0
async def handle_first_receive(bot: Bot, event: Event, state: T_State):
    args = str(event.get_plaintext()).strip().split()
    if not args:
        pass
    elif args and len(args) == 1:
        state['sub_command'] = args[0]
    else:
        await omegaauth.finish('参数错误QAQ')
示例#4
0
async def handle_first_receive(bot: Bot, event: Event, state: T_State):
    args = str(event.get_plaintext()).strip().lower().split()
    if not args:
        pass
    elif args and len(args) == 1:
        state['group'] = args[0]
    elif args and len(args) == 2:
        state['group'] = args[0]
        state['announce_text'] = args[1]
    else:
        await announce.finish('参数错误QAQ')