Skip to content

Commit

Permalink
feat: agrego logger a ThreatsAndMenaces
Browse files Browse the repository at this point in the history
  • Loading branch information
SBen-IV committed Mar 24, 2023
1 parent 0742b3f commit 5908d0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions view/threats_and_menaces.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from view.imprenta import Imprenta
from telegram import ParseMode, Chat
from emoji import emojize
from error_handler import logger
from error_handler import logging

MAS_INFORMACION = emojize(":information: Más información")

class ThreatsAndMenaces(Imprenta):
def __init__(self):
self.logger = logging.getLogger(__class__.__name__)

def enviar_noticias(self, chat: Chat, noticias: list) -> None:
logger.info("Enviando noticias a {chat_name}.".format(chat_name=chat.title))
self.logger.info("Enviando noticias a {chat_name}.".format(chat_name=chat.title))

for noticia in noticias:
chat.send_message("<b>" + noticia.titulo + "</b>" + "\n\n" + \
Expand Down

0 comments on commit 5908d0c

Please sign in to comment.