Exemple #1
0
def bluetext_ignore_list(bot: Bot, update: Update):

    message = update.effective_message
    chat = update.effective_chat

    global_ignored_list, local_ignore_list = sql.get_all_ignored(chat.id)
    text = ""

    if global_ignored_list:
        text = "The following commands are currently ignored globally from bluetext cleaning :\n"

        for x in global_ignored_list:
            text += f" - <code>{x}</code>\n"

    if local_ignore_list:
        text += "\nThe following commands are currently ignored locally from bluetext cleaning :\n"

        for x in local_ignore_list:
            text += f" - <code>{x}</code>\n"

    if text == "":
        text = "No commands are currently ignored from bluetext cleaning."
        message.reply_text(text)
        return

    message.reply_text(text, parse_mode=ParseMode.HTML)
    return
Exemple #2
0
def bluetext_ignore_list(bot: Bot, update: Update):

    message = update.effective_message
    chat = update.effective_chat

    global_ignored_list, local_ignore_list = sql.get_all_ignored(chat.id)
    text = ""

    if global_ignored_list:
        text = "Perintah berikut saat ini diabaikan secara global dari pembersihan bluetext :\n"

        for x in global_ignored_list:
            text += f" - <code>{x}</code>\n"

    if local_ignore_list:
        text += "\nPerintah berikut saat ini diabaikan secara lokal dari pembersihan bluetext :\n"

        for x in local_ignore_list:
            text += f" - <code>{x}</code>\n"

    if text == "":
        text = "Saat ini tidak ada perintah yang diabaikan dari pembersihan bluetext."
        message.reply_text(text)
        return

    message.reply_text(text, parse_mode=ParseMode.HTML)
    return
def bluetext_ignore_list(bot: Bot, update: Update):

    message = update.effective_message
    ignored_list = sql.get_all_ignored()
    text = "The following commands are currently ignored from bluetext cleaning :\n"

    if ignored_list:
        for ignored_command in ignored_list:
            text += f"- {ignored_command}\n"

        message.reply_text(text)
        return

    text = "No commands are currently ignored from bluetext cleaning."
    message.reply_text(text)
    return