Fakultas Ilmu Komputer UI

Commit d868b225 authored by zakiraihan's avatar zakiraihan
Browse files

Reformating template

parent 77b01366
......@@ -73,7 +73,7 @@ def sendNotifSisurat():
else:
textNotif = createNotifSisurat(req_data)
param = urllib.parse.urlencode({'chat_id': user.chatId, 'text': textNotif})
url = "https://api.telegram.org/bot" + TOKEN + "/sendMessage?" + param
url = "https://api.telegram.org/bot" + TOKEN + "/sendMessage?" + param + "&parse_mode=markdown"
r = requests.get(url = url)
return r.json()
......
def createNotifSisurat(data):
if (data['type'] == 0):
return '''
Pengumuman Sisurat Fasilkom UI,\n
Judul Surat: %s
Milik akun: %s
Status: Baru Diajukan.\n
Terima Kasih,\n
surat.cs.ui.ac.id
<p>Pengumuman Sisurat Fasilkom UI</p><br>
<p>Judul Surat: %s </p><br>
<p>Milik akun: %s </p><br>
<p>Status: Baru Diajukan.</p><br>
<p>Terima Kasih</p><br>
<p>surat.cs.ui.ac.id</p>
''' % (data['judulSurat'], data['username'])
elif (data['type'] == 1):
return '''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment