Ejemplo n.º 1
0
def no_longer_afk(update, context):
    user = update.effective_user
    message = update.effective_message

    if not user:  # ignore channels
        return

    res = sql.rm_afk(user.id)
    if res:
        if message.new_chat_members:  # dont say msg
            return
        firstname = update.effective_user.first_name
        try:
            options = [
                "{} is here!",
                "{} is back!",
                "{} is now in the chat!",
                "{} is awake!",
                "{} is back online!",
                "{} is finally here!",
                "Welcome back! {}",
                "Where is {}?\nIn the chat!",
            ]
            chosen_option = random.choice(options)
            unafk = update.effective_message.reply_text(
                chosen_option.format(firstname)
            )
            sleep(10)
            unafk.delete()
        except BaseException:
            return
Ejemplo n.º 2
0
def no_longer_afk(update, context):
    user = update.effective_user
    message = update.effective_message

    if not user:  # ignore channels
        return

    res = sql.rm_afk(user.id)
    if res:
        if message.new_chat_members:  # dont say msg
            return
        firstname = update.effective_user.first_name
        try:
            options = [
                "{} dih bangsat balik lagi!",
                "{} hai kampang welback!",
                "{} pengangguran sok sibuk balik!",
                "{} wb anak anjeeng!",
                "{} kembali siap memberantas sange online!",
                "{} gausa balik lagi gapenting!",
                "hmm balik paling abis nyari pap tt! {}",
                "Where is {}?\nIn the chat!",
            ]
            chosen_option = random.choice(options)
            unafk = update.effective_message.reply_text(
                chosen_option.format(firstname))
            sleep(10)
            unafk.delete()
        except BaseException:
            return
Ejemplo n.º 3
0
def __gdpr__(user_id):
    sql.rm_afk(user_id)