diff --git a/db.py b/db.py
index 26892d30..48b51a5d 100644
--- a/db.py
+++ b/db.py
@@ -19,7 +19,6 @@ import sql_queries
from flask import escape
import configparser
import typing
-import strings
if typing.TYPE_CHECKING:
# noinspection PyPackageRequirements
from discord import User as DiscordUser
@@ -837,11 +836,10 @@ class Diario(Base):
return f"{self.id} - {self.timestamp} - {self.author}: {self.text}"
def to_telegram(self):
- return strings.safely_format_string(strings.DIARIO.ENTRY, words={
- "id": self.id,
- "author": self.author,
- "text": self.text
- })
+ return '#{id} di {author}\n{text}'.format(
+ id=self.id,
+ author=self.author,
+ text=escape(self.text))
def to_html(self):
return str(escape(self.text)).replace("\n", "
")
diff --git a/strings.py b/strings.py
index d9f80333..997cec06 100644
--- a/strings.py
+++ b/strings.py
@@ -32,7 +32,7 @@ PONG = "🏓 Pong!"
# Diario
class DIARIO:
SUCCESS = "✅ Riga aggiunta al diario:\n{diario}"
- ENTRY = '#{id} di {author}\n{text}'
+ ENTRY =
class ERRORS:
INVALID_SYNTAX = "⚠ Sintassi del comando errata.\nSintassi: /diario (frase)
, oppure rispondi a un messaggio con /diario
."