コード例 #1
0
ファイル: misc.py プロジェクト: The-Earth/Cat-big-bot
def get_permalink_cri(msg: catbot.Message) -> bool:
    return command_detector('/permalink', msg) and msg.chat.type == 'private'
コード例 #2
0
ファイル: misc.py プロジェクト: The-Earth/Cat-big-bot
def get_user_id_cri(msg: catbot.Message) -> bool:
    return command_detector('/user_id', msg)
コード例 #3
0
ファイル: misc.py プロジェクト: The-Earth/Cat-big-bot
def start_cri(msg: catbot.Message) -> bool:
    return command_detector('/start', msg) and msg.chat.type == 'private'
コード例 #4
0
ファイル: misc.py プロジェクト: The-Earth/Cat-big-bot
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)
コード例 #5
0
ファイル: poll.py プロジェクト: The-Earth/Cat-big-bot
def set_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_voter', msg) and msg.chat.type != 'private'
コード例 #6
0
ファイル: pm.py プロジェクト: The-Earth/Cat-big-bot
def list_block_private_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_blocked', msg) and msg.chat.id == config['operator_id']
コード例 #7
0
ファイル: poll.py プロジェクト: The-Earth/Cat-big-bot
def unset_voter_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_voter', msg)
コード例 #8
0
ファイル: poll.py プロジェクト: The-Earth/Cat-big-bot
def init_poll_cri(msg: catbot.Message) -> bool:
    return command_detector('/init_poll', msg) and msg.chat.type != 'private'
コード例 #9
0
ファイル: trusted_user.py プロジェクト: The-Earth/Cat-big-bot
def set_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/set_trusted', msg)
コード例 #10
0
ファイル: trusted_user.py プロジェクト: The-Earth/Cat-big-bot
def list_trusted_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_trusted',
                            msg) and msg.chat.type != 'private'
コード例 #11
0
ファイル: mark.py プロジェクト: The-Earth/Cat-big-bot
def mark_cri(msg: catbot.Message) -> bool:
    return command_detector('/mark', msg)
コード例 #12
0
ファイル: mark.py プロジェクト: The-Earth/Cat-big-bot
def list_marked_cri(msg: catbot.Message) -> bool:
    return command_detector('/list_marked', msg)
コード例 #13
0
def unset_channel_helper_cri(msg: catbot.Message) -> bool:
    return command_detector('/unset_channel_helper',
                            msg) and msg.chat.type == 'supergroup'