示例#1
0
        public CoolQRouteMessage(CoolQMessage message, CoolQIdentity cqIdentity, string atId = null)
        {
            Message = message;
            switch (cqIdentity.Type)
            {
            case MessageType.Private:
                MessageType = MessageType.Private;
                UserId      = cqIdentity.Id.ToString();
                break;

            case MessageType.Discuss:
                MessageType = MessageType.Discuss;
                DiscussId   = cqIdentity.Id.ToString();
                break;

            case MessageType.Group:
                MessageType = MessageType.Group;
                GroupId     = cqIdentity.Id.ToString();
                break;
            }

            if (atId == null)
            {
                return;
            }
            EnableAt = true;
            UserId   = atId;
        }
示例#2
0
 public CoolQRouteMessage(CoolQCode message, CoolQIdentity cqIdentity, string atId = null) :
     this(new CoolQMessage(message), cqIdentity, atId)
 {
 }
示例#3
0
 public CoolQRouteMessage(string message, CoolQIdentity cqIdentity, string atId = null) :
     this(new Text(message), cqIdentity, atId)
 {
 }