1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

New antiflood function

This commit is contained in:
Andrea Barbagallo
2021-11-03 15:30:10 +01:00
parent d1c26f82aa
commit 558b37b1c3
2 changed files with 29 additions and 0 deletions

View File

@@ -455,6 +455,13 @@ class TestTeleBot:
new_msg = tb.edit_message_reply_markup(chat_id=CHAT_ID, message_id=ret_msg.message_id, reply_markup=markup)
assert new_msg.message_id
def test_antiflood(self):
text = "Flooding"
tb = telebot.TeleBot(TOKEN)
for _ in range(0,100):
util.antiflood(tb.send_message, CHAT_ID, text)
assert _
@staticmethod
def create_text_message(text):
params = {'text': text}