26 lines
826 B
Python
26 lines
826 B
Python
import betterproto
|
|
from game_server.net.session import PlayerSession
|
|
from rail_proto.lib import (
|
|
GetPrivateChatHistoryCsReq,
|
|
GetPrivateChatHistoryScRsp,
|
|
ChatMessageData,
|
|
MsgType
|
|
)
|
|
|
|
async def handle(session: PlayerSession, msg: GetPrivateChatHistoryCsReq) -> betterproto.Message:
|
|
return GetPrivateChatHistoryScRsp(
|
|
retcode=0,
|
|
contact_side=msg.contact_side,
|
|
chat_message_list=[
|
|
ChatMessageData(
|
|
message_type=MsgType.MSG_TYPE_CUSTOM_TEXT.value,
|
|
content="No commands available. FUCK OFF!",
|
|
sender_id=69
|
|
),
|
|
ChatMessageData(
|
|
message_type=MsgType.MSG_TYPE_CUSTOM_TEXT.value,
|
|
content="Hi....",
|
|
sender_id=session.player.data.uid
|
|
)
|
|
]
|
|
) |