Exemple #1
0
def greet_user(message):
    random_number = random.randint(0, len(emotions.salutations) - 1)
    greeting = emotions.salutations[random_number]
    uid = get_user_credentials(message)['uid']
    first_name = get_user_credentials(message)['first_name']
    last_name = get_user_credentials(message)['last_name']
    text = f"{greeting} {first_name} {last_name}."
    bot.send_message(uid, text=text)
Exemple #2
0
def send_animated_message(message, message_text, category):
    attach_video(message, category)
    bot.send_message(message.from_user.id, message_text)
Exemple #3
0
def send_manual_to_user(message):
    uid = get_user_credentials(message)['uid']
    bot.send_message(uid, text=manual)
Exemple #4
0
def log(*data):
    if should_log:
        bot.send_message(dev,
                         ', '.join([str(x) for x in data]),
                         parse_mode='html')