示例#1
0
def kcfrsct_fnc(bot: Bot, update: Update):
    query = update.callback_query
    user = update.effective_user
    _match = re.match(r"rsct_(.*)_33801", query.data)
    # ensure no spinny white circle
    if _match:
        try:
            from tg_bot.modules.sql.cust_filters_sql import get_btn_with_di
            _soqka = get_btn_with_di(int(_match.group(1)))
            query.answer(text=_soqka.url, show_alert=True)
        except:
            bot.answer_callback_query(query.id)
示例#2
0
def kcfrsct_fnc(bot: Bot, update: Update):
    query = update.callback_query
    user = update.effective_user
    _match = re.match(r"rsct_(.*)_33801", query.data)
    # ensure no spinny white circle
    if _match:
        try:
            from tg_bot.modules.sql.cust_filters_sql import get_btn_with_di
            _soqka = get_btn_with_di(int(_match.group(1)))
            query.answer(
                text=_soqka.url.replace("\\n", "\n").replace("\\t", "\t"),
                # HPFPOCWBANER: https://stackoverflow.com/a/42965750
                show_alert=True)
        except Exception as e:
            print(e)
            bot.answer_callback_query(query.id)