示例#1
0
def afk(bot: Bot, update: Update):
    args = update.effective_message.text.split(None, 1)
    reason = args[1] if len(args) >= 2 else ""
    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text(
        "{} is away from the keyboard ! ".format(
            update.effective_user.first_name))
示例#2
0
def afk(update: Update, context: CallbackContext):
    args = update.effective_message.text.split(None, 1)
    user = update.effective_user

    if not user:  # ignore channels
        return

    if user.id in (777000, 1087968824):
        return

    notice = ""
    if len(args) >= 2:
        reason = args[1]
        if len(reason) > 100:
            reason = reason[:100]
            notice = "\nYour afk reason was shortened to 100 characters."
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, reason)
    fname = update.effective_user.first_name
    try:
        update.effective_message.reply_text("{} is now away!{}".format(
            fname, notice))
    except BadRequest:
        pass
示例#3
0
def afk(bot: Bot, update: Update):
    args = update.effective_message.text.split(None, 1)
    reason = ""
    if len(args) >= 2:
        reason = args[1]

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text("{} is now away!".format(update.effective_user.first_name))
示例#4
0
def afk(bot: Bot, update: Update):
    args = update.effective_message.text.split(None, 1)
    reason = ""
    if len(args) >= 2:
        reason = args[1]

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text("*{}* Is Now Away!".format(update.effective_user.first_name), parse_mode=ParseMode.MARKDOWN)
示例#5
0
def afk(bot: Bot, update: Update):
    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)
示例#6
0
def afk(bot: Bot, update: Update):
    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(get_string("afk", "MSG_IS_AFK_NOW", lang.get_lang(update.effective_chat.id)).format(update.effective_user.first_name)) # MSG_IS_AFK_NOW
示例#7
0
def afk(bot: Bot, update: Update):
    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("{} ഇവിടെ എങ്ങും ഇല്ല ........ ജീവിച്ചിരിപ്പുണ്ടോ എന്ന് പോലും അറിയില്ല .... ! ".format(update.effective_user.first_name))
示例#8
0
def afk(bot: Bot, update: Update):
    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("{} şuan meşgul!".format(update.effective_user.first_name))
示例#9
0
def afk(bot: Bot, update: Update):
    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("{} ഇപ്പോൾ കീബോർഡിൽ നിന്നും അകലെ ആണ് ! ".format(update.effective_user.first_name))
示例#10
0
def afk(bot: Bot, update: Update):
    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("{} , ഡേയ് പോകുന്നതോക്കെ കൊള്ളാം .പെട്ടെന്ന് വന്നോളണം.... കേട്ടല്ലോ ".format(update.effective_user.first_name))
示例#11
0
文件: afk.py 项目: marchingon12/tgbot
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)
    afkstr = random.choice(fun.AFK)
    update.effective_message.reply_text(afkstr.format(update.effective_user.first_name))
示例#12
0
def afk(bot: Bot, update: Update):
    args = update.effective_message.text.split(None, 1)
    reason = ""
    if len(args) >= 2:
        reason = args[1]

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text(
        "{} р┤ор╡Бр┤др╡Нр┤др╡Бр┤ор┤гр┤┐ р┤кр╡Лр┤пр┤┐ ЁЯШвЁЯШв!".format(
            update.effective_user.first_name))
示例#13
0
def afk(bot: Bot, update: Update):
    chat = update.effective_chat  # type: Optional[Chat]
    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(tld(chat.id, "{} is now HIDING!").format(update.effective_user.first_name))
示例#14
0
def afk(update: 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)
    update.effective_message.reply_text("{} 님이 자리를 비웠어요!".format(
        update.effective_user.first_name))
示例#15
0
def afk(bot: Bot, update: Update):
    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(
        "{} р┤Зр┤кр╡Нр┤кр╡Лр╡╛ р┤Хр╡Ар┤мр╡Лр╡╝р┤бр┤┐р╡╜ р┤ир┤┐р┤ир╡Нр┤ир╡Бр┤В р┤Ер┤Хр┤▓р╡Ж р┤Жр┤гр╡Н ЁЯШФ! "
        .format(update.effective_user.first_name))
示例#16
0
def afk(bot: Bot, update: Update):
    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(
        "{} is now Away From His Keyboard and Going Offline!".format(
            update.effective_user.first_name))
示例#17
0
def afk(bot: Bot, update: Update):
    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(
        "{} afk açık bir durumda botunuzun afk olmasi ! ".format(
            update.effective_user.first_name))
示例#18
0
def afk(bot: Bot, update: Update):
    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(
        "{} is away from the keyboard ! [JOIN HERE](t.me/giveaways_24hrs) . ".
        format(update.effective_user.first_name))
示例#19
0
文件: afk.py 项目: abrock00/tgbot
def afk(bot: Bot, update: Update):
    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_photo(
        tg_bot_IMG,
        "{} 😂😂 ആരും കണ്ടില്ല 😂😂".format(update.effective_user.first_name))
示例#20
0
def afk(bot: Bot, update: Update):
    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(
        "❎ <b>{}</b> <i>sekarang afk</i> ‼️".format(
            update.effective_user.first_name))
示例#21
0
def afk(bot: Bot, update: Update):
    chat = update.effective_chat  # type: Optional[Chat]
    args = update.effective_message.text.split(None, 1)
    if len(args) >= 2:
        reason = args[1]
    else:
        reason = ""
    global start_time
    start_time = time.time()
    sql.set_afk(update.effective_user.id, reason)
    fname = update.effective_user.first_name
    update.effective_message.reply_text(tld(chat.id, f"{fname} is now AFK!"))
示例#22
0
def afk(bot: Bot, update: Update):
    user = update.effective_user
    args = update.effective_message.text.split(None, 1)

    if not user:
        return

    if user.id in (777000, 1087968824):
        return

    reason = args[1] if len(args) >= 2 else ""
    sql.set_afk(update.effective_user.id, reason)
    fname = update.effective_user.first_name
    update.effective_message.reply_text(f"{fname} is now AFK!")
示例#23
0
def afk(update: Update, context: CallbackContext):
    args = update.effective_message.text.split(None, 1)
    afk_time = int(time.time())
    notice = ""
    if len(args) >= 2:
        reason = args[1]
        if len(reason) > 100:
            reason = reason[:100]
            notice = "\nYour afk reason was shortened to 100 characters."
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, afk_time, reason)
    fname = update.effective_user.first_name
    update.effective_message.reply_text("{} is now away!{}".format(
        fname, notice))
示例#24
0
def afk(bot: Bot, update: Update):
    user = update.effective_user
    args = update.effective_message.text.split(None, 1)

    if not user:
        return

    if user.id in (777000, 1087968824):
        return

    reason = ""
    if len(args) >= 2:
        reason = args[1]

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text("{} is away from keyboard !".format(
        update.effective_user.first_name))
示例#25
0
def afk(bot: Bot, update: Update):
    user = update.effective_user
    args = update.effective_message.text.split(None, 1)

    if not user:
        return

    if user.id in (777000, 1087968824):
        return

    if len(args) >= 2:
        reason = args[1]
    else:
        reason = ""

    sql.set_afk(update.effective_user.id, reason)
    update.effective_message.reply_text("{} sekarang sudah meninggoy!".format(update.effective_user.first_name))
示例#26
0
def afk(bot: Bot, update: Update):
    user = update.effective_user
    args = update.effective_message.text.split(None, 1)

    if not user:
        return

    if user.id in (1025855210):
        return

    reason = ""
    if len(args) >= 2:
        reason = args[1]

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