Skip to content

Commit c20a0c2

Browse files
committed
notification adjustments
1 parent 73728e5 commit c20a0c2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/custom_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def observe_chat():
171171
if enable_reminders:
172172
manage_reminder_function = {
173173
'name': 'manage_reminder',
174-
'description': """Manages user reminders (alerts). Specify the action: 'add' to create, 'view' to list pending, 'delete' to remove by ID, or 'edit' to modify by ID.
174+
'description': """Manages user reminders (alerts); use if the user requests alerts, a timed notification, etc (hälytys, muistutus..) Specify the action: 'add' to create, 'view' to list pending, 'delete' to remove by ID, or 'edit' to modify by ID.
175175
- For 'add': requires 'reminder_text' and exact 'due_time_utc' (ISO 8601 format, e.g., '2025-04-04T10:00:00Z'). Calculate UTC from user input based on current system UTC time.
176176
- For 'view': no other parameters needed.
177177
- For 'delete': requires 'reminder_id'.

src/reminder_poller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import db_utils
1111
from telegram.ext import Application
1212
from telegram.error import Forbidden, BadRequest
13+
from telegram.constants import ParseMode
1314

1415
# load and use logger
1516
logger = logging.getLogger(__name__)
@@ -70,7 +71,8 @@ async def reminder_poller(application: Application):
7071
# --- Use application.bot to send ---
7172
await application.bot.send_message(
7273
chat_id=chat_id,
73-
text=msg
74+
text=msg,
75+
parse_mode=ParseMode.HTML
7476
# Consider adding parse_mode=ParseMode.HTML if needed later
7577
)
7678
# --- Update status using correct function and DB path ---

0 commit comments

Comments
 (0)