예제 #1
0
def afk(update, context):
    args = update.effective_message.text.split(None, 1)
    if len(args) >= 2:
        reason = args[1]
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, reason)
    send_message(
        update.effective_message,
        tl(update.effective_message,
           "{} sekarang AFK!").format(update.effective_user.first_name))
예제 #2
0
파일: afk.py 프로젝트: MhdRezza/Balqisbot
def afk(bot: Bot, update: Update):
    spam = spamfilters(update.effective_message.text, update.effective_message.from_user.id, update.effective_chat.id, update.effective_message)
    if spam == True:
        return

    args = update.effective_message.text.split(None, 1)
    if len(args) >= 2:
        reason = args[1]
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, reason)
    send_message(update.effective_message, tl(update.effective_message, "{} sekarang AFK!").format(update.effective_user.first_name))
예제 #3
0
def afk(bot: Bot, update: Update):
    spam = spamfilters(update.effective_message.text,
                       update.effective_message.from_user.id,
                       update.effective_chat.id)
    if spam == True:
        return update.effective_message.reply_text(
            "Saya kecewa dengan anda, saya tidak akan mendengar kata-kata anda sekarang!"
        )

    args = update.effective_message.text.split(None, 1)
    if len(args) >= 2:
        reason = args[1]
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text("{} sekarang AFK!".format(
        update.effective_user.first_name))