Beispiel #1
0
def run(msg, matches):
    receiver = utils.get_receiver(msg)
    print()
    if len(matches) == 1:
        if matches[0] == "!id":
            return user_id(msg)
        elif matches[0] == 'chat':
            if not utils.is_chat_msg(msg):
                return 'You are not in a chat'
            else:
                receiver.info(callback)
    elif len(matches) == 2:
        return "Not implemented yet the function necesary in tgl :'('"
    # Implement your run function here
    return ""
Beispiel #2
0
def run(msg, matches):
    receiver = utils.get_receiver(msg)
    print()
    if len(matches) == 1:
        if matches[0] == "!id":
            return user_id(msg)
        elif matches[0] == 'chat':
            if not utils.is_chat_msg(msg):
                return 'You are not in a chat'
            else:
                receiver.info(callback)
    elif len(matches) == 2:
        return "Not implemented yet the function necesary in tgl :'('"
    # Implement your run function here
    return ""
Beispiel #3
0
def user_id(msg):
    text = "{} (user#id{})".format(msg.src.name, msg.src.id)
    if utils.is_chat_msg(msg):
        text = "{}\nYou are in group {} (chat#id{})".format(
            text, msg.dest.name, msg.dest.id)
    return text
Beispiel #4
0
def user_id(msg):
    text = "{} (user#id{})".format(msg.src.name, msg.src.id)
    if utils.is_chat_msg(msg):
        text = "{}\nYou are in group {} (chat#id{})".format(text, msg.dest.name, msg.dest.id)
    return text