Exemple #1
0
def get_permalink_cri(msg: catbot.Message) -> bool:
    return command_detector('/permalink', msg) and msg.chat.type == 'private'
Exemple #2
0
def get_user_id_cri(msg: catbot.Message) -> bool:
    return command_detector('/user_id', msg)
Exemple #3
0
def start_cri(msg: catbot.Message) -> bool:
    return command_detector('/start', msg) and msg.chat.type == 'private'
Exemple #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)
Exemple #5
0
def set_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_voter', msg) and msg.chat.type != 'private'
Exemple #6
0
def list_block_private_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_blocked', msg) and msg.chat.id == config['operator_id']
Exemple #7
0
def unset_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_voter', msg)
Exemple #8
0
def init_poll_cri(msg: catbot.Message) -> bool:
    return command_detector('/init_poll', msg) and msg.chat.type != 'private'
def set_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_trusted', msg)
Exemple #10
0
def list_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_trusted',
                            msg) and msg.chat.type != 'private'
Exemple #11
0
def mark_cri(msg: catbot.Message) -> bool:
    return command_detector('/mark', msg)
Exemple #12
0
def list_marked_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_marked', msg)
def unset_channel_helper_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_channel_helper',
                            msg) and msg.chat.type == 'supergroup'