Example #1
0
def get_permalink_cri(msg: catbot.Message) -> bool:
    return command_detector('/permalink', msg) and msg.chat.type == 'private'
Example #2
0
def get_user_id_cri(msg: catbot.Message) -> bool:
    return command_detector('/user_id', msg)
Example #3
0
def start_cri(msg: catbot.Message) -> bool:
    return command_detector('/start', msg) and msg.chat.type == 'private'
Example #4
0
def bot_help_cri(msg: catbot.Message) -> bool:
    if msg.chat.type != 'private':
        return f'/help@{bot.username}' in msg.commands and msg.text.startswith(
            f'/help@{bot.username}')
    else:
        return command_detector('/help', msg)
Example #5
0
def set_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_voter', msg) and msg.chat.type != 'private'
Example #6
0
def list_block_private_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_blocked', msg) and msg.chat.id == config['operator_id']
Example #7
0
def unset_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_voter', msg)
Example #8
0
def init_poll_cri(msg: catbot.Message) -> bool:
    return command_detector('/init_poll', msg) and msg.chat.type != 'private'
Example #9
0
def set_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_trusted', msg)
Example #10
0
def list_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_trusted',
                            msg) and msg.chat.type != 'private'
Example #11
0
def mark_cri(msg: catbot.Message) -> bool:
    return command_detector('/mark', msg)
Example #12
0
def list_marked_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_marked', msg)
Example #13
0
def unset_channel_helper_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_channel_helper',
                            msg) and msg.chat.type == 'supergroup'