I hope that help someone in the future.
After execute all steps that tutorial and feedbacks on internet, this resource still didn't work for me on aaPanel I received this message "Title:[aaPanel notifications],method to informe:[Telegram],recipient:[ success:Fail ]", so I needed to change in your code. Let's see:
First step.
On Linux terminal,
Go to:
cd /www/server/panel/class/msg/
Find file "tg_msg.py"
Now create a secure copy:
cp tg_msg.py tg_msg.py.bkp
Open the file:
nano tg_msg.py
Search for line with follow content (line 147):
character = ['\\', '_', '', '*', '{', '}', '[', ']', '(', ')', '>', '#' , '+', '-', '=', '.', '!']
and replace for that:
character = ['\\', '_', '|', '', '*', '{', '}', '[', ']', '(', ')', '> ', '#', '+', '-', '=', '.', '!']
After that, save and exit of file.
Restart panel:
bt 1
Now, test sending the alert.
We add character '|' this character is reserved on MarkdownV2 and need it escaped.
Second step. (If you continue to get an error).
Find file(s) "panelModel.py"
Follow the command:
sudo find / -name "panelModel.py"
Go to the file(s).
Now create a secure copy:
cp panelModel.py panelModel.py.bkp
Open the file:
nano panelModel.py
Search for line with follow content (line 201):
if username and not re.search('-\s+({})\s+\('.format(username),line):
and replace for that:
if username and not re.search(r'-\s+({})\s+\('.format(username),_line):
After that, save and exit of file.
Restart panel:
bt 1
Now, test sending the alert.
I believe that help you solve this situation. Now I'm receiving notification on Telegram normally. My Panel version is 7.0.6 and my server is a Debian 12.