This repository has been archived on 2024-09-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Douyin_Web_Live/messages/member.py
T

14 lines
473 B
Python

import time
from protobuf import message_pb2
from messages.base import Base
class MemberMessage(Base):
def __init__(self):
self.instance = message_pb2.MemberMessage()
def __str__(self):
template = self.instance.common.displayText.defaultPattern
nickname = self.user().nickname
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + '【进入直播间】' + template.replace('{0:user}', nickname).replace('{1:string}', '')