Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ZAKI RAIHAN
1606878505_ossd_telegram_notif_bot
Commits
1dec15a7
Commit
1dec15a7
authored
Oct 30, 2019
by
ZAKI RAIHAN
Browse files
Add parse_mode=HTML in custom messages
parent
7d2e46b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
app.py
View file @
1dec15a7
...
...
@@ -56,7 +56,7 @@ def sendNotifCustom():
return
{
'status'
:
500
,
'message'
:
'User notification is being turned off'
}
else
:
param
=
urllib
.
parse
.
urlencode
({
'chat_id'
:
user
.
chatId
,
'text'
:
req_data
[
'message'
]})
url
=
"https://api.telegram.org/bot"
+
TOKEN
+
"/sendMessage?"
+
param
url
=
"https://api.telegram.org/bot"
+
TOKEN
+
"/sendMessage?"
+
param
+
"&parse_mode=HTML"
r
=
requests
.
get
(
url
=
url
)
return
r
.
json
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment