diff --git a/busi/friend.go b/busi/friend.go index 2f57b1b..69d01fe 100644 --- a/busi/friend.go +++ b/busi/friend.go @@ -21,10 +21,8 @@ func (f *FriendScene) Info() lib.SceneInfo { } func (f *FriendScene) Run(robot lib.IRobot) error { - head := &pb.UserMessage{MainType: "", SubType: ""} - req := &pb.FriendRandlistReq{} rsp := &pb.FriendRandlistResp{} - robot.SendMsg(head, req, rsp) + robot.SendMsg("", "", req, rsp) return nil } diff --git a/lib/robot.go b/lib/robot.go index 390e8dc..2e596f1 100644 --- a/lib/robot.go +++ b/lib/robot.go @@ -23,11 +23,11 @@ type IRobot interface { // GetCurrentScene() *scene // 发送消息 - SendMsg(head *pb.UserMessage, req proto.Message, rsp proto.Message) error + SendMsg(mainType, subType string, req proto.Message, rsp proto.Message) error // 存储数据 - Store(key string, data []byte) + Store(key string, data interface{}) // 获取数据 - Get(key string) []byte + Get(key string) interface{} // 停止运行 Stop() bool }