first
This commit is contained in:
22
msg/AdminNotifMsg.py
Normal file
22
msg/AdminNotifMsg.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from bot.HtmlMsg import HtmlMsg
|
||||
|
||||
|
||||
class AdminNotifMsg(HtmlMsg):
|
||||
|
||||
def get_msg(self, data=None) -> str:
|
||||
if data is None:
|
||||
data = {}
|
||||
cl = ""
|
||||
recipient = ""
|
||||
status = ""
|
||||
if data['admin']['status'] == 2:
|
||||
cl = "<b>Ссылка:</b> {channel_link}\n".format(channel_link=data['post']['channel_link'])
|
||||
if 'recipient_respond' in data:
|
||||
recipient = "Эксперт @{username} откликнулся на вакансию\n".format(username=data['recipient']['username'])
|
||||
if 'status' in data:
|
||||
status = "Статус: <b>{status}</b>\n".format(status=data['status'])
|
||||
ct = "<b>Название:</b> {channel_title}\n".format(channel_title=data['post']['channel_title'])
|
||||
content = "<b>Текст:</b>\n{content}".format(content=data['post']['content'])
|
||||
msg = "{recipient}{status}{cl}{ct}{content}".format(cl=cl, ct=ct, content=content, recipient=recipient, status=status)
|
||||
|
||||
return self.get_stylized_msg(msg)
|
Reference in New Issue
Block a user