Ejemplo n.º 1
0
def no_longer_afk(bot: Bot, update: Update):
    user = update.effective_user

    if not user:
        return

    res = sql.rm_afk(user.id)
    if res:
        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)
        update.effective_message.reply_text(
            chosen_option.format(update.effective_user.first_name))
Ejemplo n.º 2
0
def no_longer_afk(bot: Bot, update: Update):
    user = update.effective_user

    if not user:
        return

    res = sql.rm_afk(user.id)
    if res:
        options = [
            "{} Telah Kembali!",
            "Ada Yang kangen {}?",
            "{} sekarang waktunya nimbrung!",
            "{} disini menantimu:)!",
            "{} Telah ONLINE!",
            "{} welcome back {} !",
            "{} tetap semangat ",
            "Darimana lu {}?\nAbis apa hayo ?",
            "Ramein grupnya yuk!",
        ]
        chosen_option = random.choice(options)
        update.effective_message.reply_text(
            chosen_option.format(update.effective_user.first_name))
Ejemplo n.º 3
0
def no_longer_afk(bot: Bot, update: Update):
    user = update.effective_user

    if not user:
        return

    res = sql.rm_afk(user.id)
    if res:
        options = [
            "{} ada disini!",
            "Eh si {} telah muncul!",
            "{} telah muncul dari Isekai.",
            "{} telah kembali!",
            "{} sekarang sedang mengobrol!",
            "{} sudah bangun!",
            "{} kembali online!",
            "{} akhirnya di sini!",
            "Yey. Selamat datang kembali!, {}",
            "Di mana {}?\Ternyata dia sudah di dalam obrolan!",
        ]
        chosen_option = random.choice(options)
        update.effective_message.reply_text(
            chosen_option.format(update.effective_user.first_name))
Ejemplo n.º 4
0
def no_longer_afk(bot: Bot, update: Update):
    user = update.effective_user  # type: Optional[User]
    chat = update.effective_chat  # type: Optional[Chat]
    message = update.effective_message  # type: Optional[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)
            update.effective_message.reply_text(
                chosen_option.format(firstname))
        except:
            return
Ejemplo n.º 5
0
def __gdpr__(user_id):
    sql.rm_afk(user_id)
Ejemplo n.º 6
0
def no_longer_afk(bot, update):
    user = update.effective_user
    res = sql.rm_afk(user.id)
    if res:
        update.effective_message.reply_text("{} is no longer AFK!".format(
            update.effective_user.first_name))