Пример #1
0
def check_afk(bot, update, user_id, fst_name):
    if sql.is_afk(user_id):
        valid, reason = sql.check_afk_status(user_id)
        if valid:
            if not reason:
                res = "{} is AFK!".format(fst_name)
            else:
                res = "{} is AFK! says its because of:\n{}".format(fst_name, reason)
            message.reply_text(res)
Пример #2
0
def check_afk(bot, update, user_id, fst_name):
    if sql.is_afk(user_id):
        user = sql.check_afk_status(user_id)
        if not user.reason:
            res = "{} is AFK!".format(fst_name)
        else:
            res = "{} is AFK! says it because : \n{}".format(
                fst_name, user.reason)
        update.effective_message.reply_text(res)