コード例 #1
0
ファイル: afk.py プロジェクト: matesa/Miss-Rose-Bot
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
ファイル: afk.py プロジェクト: rehan77559/BLACK-LEGEND
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
ファイル: afk.py プロジェクト: santosurviver/Marie_Chechi2.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
ファイル: afk.py プロジェクト: tahirdeger/hayriBot
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
ファイル: afk.py プロジェクト: marknano009/FOCUSMOVIES-BOT
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
ファイル: afk.py プロジェクト: sakhaavvaavaj93/pournamibot
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
ファイル: afk.py プロジェクト: bodrumlu12/Marie-2.0-English
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
ファイル: afk.py プロジェクト: sandidias/EnterpriseALRobot
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))