def sticker_recived(bot, update): admins = [admin.user.id for admin in bot.get_chat_administrators(chat_id=update.message.chat_id)] if update.message.from_user.id not in admins: bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id) 

Here is a sample code. I need to remove all the stickers on the command (for example / on), and the same command on another command (for example / off)

  • It is necessary somewhere in the database to store the option, and when it is active to delete or not. - Pavel Durmanov
  • @Alban Is it possible to do something without db? - Denis Proskurenko

0