INNER CODE UNIT · Python

run_handler

sidor0912/FunPayCardinal · tg_bot/bot.py:264

        def run_handler(bot, update):
            try:
                handler(bot, update)
            except:
                logger.error(_("log_tg_handler_error"))
                logger.debug("TRACEBACK", exc_info=True)

    # Система свой-чужой 0_0
    def setup_chat_notifications(self, bot: TGBot, m: Message):
        """
        Устанавливает настройки уведомлений по умолчанию в новом чате.
        """
        if str(m.chat.id) in self.notification_settings and m.from_user.id in self.authorized_users and \
                self.is_notification_enabled(m.chat.id, NotificationTypes.critical):
            return
        elif str(m.chat.id) in self.notification_settings and m.from_user.id in self.authorized_users and not \
                self.is_notification_enabled(m.chat.id, NotificationTypes.critical):
            self.notification_settings[str(m.chat.id)][NotificationTypes.critical] = 1

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…