Answer the question
In order to leave comments, you need to log in
How to Remove the inscription, Bot blocked in the chat?
Tell me how to remove the inscription that the bot blocked in the chat, since this inscription is seen by everyone and more, tell me how to turn off notifications so that the melody does not sound on the phone, you open the curtain and there is nothing there, only sound, every time you send a bad word.
import telebot
from time import time
from telebot import types
bot = telebot.TeleBot("moy_token")
@bot.message_handler(func=lambda message: message.text and message.text.lower() in restricted_messages and message.chat.id)
def set_ro(message):
print(message.from_user.language_code)
bot.restrict_chat_member(message.chat.id, message.from_user.id, until_date=time()+300)
bot.send_message(message.chat.id, strings.get(get_language(message.from_user.language_code)).get("ro_msg"),
reply_to_message_id=message.message_id)
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