benerin posisi flag supaya bisa di pakai di follow mauapun mention

This commit is contained in:
Kusaeni 2024-09-29 21:28:59 +07:00
parent 8de74a7ba5
commit 3cde26d4f0

30
main.py
View file

@ -67,6 +67,20 @@ async def kirim_ke_tele():
for notif in cek_data:
def icon_(type_):
if type_ == 'mention':
return '💬 mention your note'
elif type_ == 'reblog':
return '🚀 boost your note'
elif type_ == 'favourite':
return '💖 falling in love with your note'
elif type_ == 'follow':
return '✋ started to follow you'
else:
return None
flag = icon_(notif.type)
if str(notif.type) == 'follow':
try:
await bot.send_message(parse_mode='html',chat_id=str(TELE_CHATID), text=f"""
@ -80,20 +94,6 @@ async def kirim_ke_tele():
status = str(notif.status)
status_text = re.sub(html_strip,'', status)
def icon_(type_):
if type_ == 'mention':
return '💬 mention your note'
elif type_ == 'reblog':
return '🚀 boost your note'
elif type_ == 'favourite':
return '💖 falling in love with your note'
elif type_ == 'follow':
return '✋ started to follow you'
else:
return None
flag = icon_(notif.type)
try:
await bot.send_message(parse_mode='html',chat_id=str(TELE_CHATID), text=f"""
<b>{notif.display_name}</b>\n<i>{notif.handler}</i>\n{flag}\n\n{status_text}\n\n{notif.url}
@ -104,5 +104,5 @@ async def kirim_ke_tele():
asyncio.run(getNotif())
# asyncio.run(getNotif())
asyncio.run(kirim_ke_tele())