28 lines
776 B
C#
28 lines
776 B
C#
using System;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace SharpChat.Events {
|
|
public class ChatMessage : IChatMessage {
|
|
[JsonIgnore]
|
|
public ChatUser Sender { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string ChannelName { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public DateTimeOffset DateTime { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public ChatMessageFlags Flags { get; set; } = ChatMessageFlags.None;
|
|
|
|
[JsonIgnore]
|
|
public long SequenceId { get; set; }
|
|
|
|
[JsonPropertyName("text")]
|
|
public string Text { get; set; }
|
|
|
|
public static string PackBotMessage(int type, string id, params string[] parts) {
|
|
return type.ToString() + '\f' + id + '\f' + string.Join('\f', parts);
|
|
}
|
|
}
|
|
}
|