Answer the question
In order to leave comments, you need to log in
How can I make the bot delete users from the database that blocked it when sending it?
It is necessary that when sending, the bot deletes users from the database that blocked the bot.
The code:
while int(i) < int(int(len(barge)) - 1):
try:
keyboard = types.InlineKeyboardMarkup()
keyboard.add(types.InlineKeyboardButton(text="Получить скидку",
url="https://deepnuder.xyz/shop.php?user=" + barge[i][12] + "&id=" + str(
barge[i][2])))
bot.send_message(barge[i][2], us[0][0], parse_mode="MARKDOWN", reply_markup=keyboard)
except:
pass
i = i + 1
print(barge[i][2])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question