@ivakhiv

Как обойти блокировку рассылки телеграм бота?

Как обойти блокировку бота телеграм рассылки,я хочу сделать рассылку,отсылает только паро юзерам,а дальше пишет что юзер заблокировал бота и стопит функцию.

@bot.message_handler(commands=['send'])
def send_stat(message):
        user_id = str(message.from_user.id)
        if user_id == str(460989471):
            args = message.text.split(' ')
            del args[0]
            args = ' '.join(args)
            with sqlite3.connect("db.db") as con:
                cur = con.cursor()
                cur.execute(f"""SELECT user_id FROM subscriptions""")
                call_sp=str(cur.fetchall()).replace('(','').replace(')','').replace("'",'').replace("[",'').replace("]",',')
                cur.execute(f"select count(*) from subscriptions")
                cilc = int(str(cur.fetchall()).replace('(','').replace(')','').replace("'",'').replace(',','').replace('[','').replace(']',''))
                text = call_sp
                print(text)
                while cilc>0:
                    text = call_sp
                    index = text.find(',')
                    index = index + len(',')
                    aa1 = (text[:index]).replace(",","")
                    call_sp = call_sp.replace(f"{aa1},, ", "")
                    text = text.replace("{aa1},,","")
                    print(text)
                    cilc -= 1
                    chat_id = aa1
                    bot.send_message(chat_id, args,parse_mode="html")
  • Вопрос задан
  • 144 просмотра
Пригласить эксперта
Ответы на вопрос 1
@Lord_Dantes
Никак
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы