Skip to content

Commit

Permalink
add footer_text in discord template
Browse files Browse the repository at this point in the history
  • Loading branch information
edulauer committed Jun 21, 2024
1 parent fff4eaa commit 668e73a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/notification/discord_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def __init__(self, specs) -> None:
self.webhook_url = specs.discord_webhook
self.hide_filters = specs.hide_filters
self.header_text = specs.header_text
self.footer_text = specs.footer_text

def send(self, search_report: list, report_date: str = None):
"""Parse the content, and send message to Discord"""
Expand All @@ -36,6 +37,10 @@ def send(self, search_report: list, report_date: str = None):
"**Nenhum dos termos pesquisados foi encontrado nesta consulta**"
)

if self.footer_text:
footer_text = self._remove_html_tags(self.footer_text)
self.send_text(footer_text)

def send_text(self, content):
self.send_data({"content": content})

Expand Down

0 comments on commit 668e73a

Please sign in to comment.