sharp-chat/SharpChatCommon/Events/MessageAddEventData.cs

17 lines
457 B
C#

using System.Text.Json.Serialization;
namespace SharpChat.Events {
[ChatEventDataFor("msg:add")]
public class MessageAddEventData : ChatEventData {
[JsonPropertyName("text")]
public string Text { get; }
[JsonPropertyName("action")]
public bool IsAction { get; }
public MessageAddEventData(string text, bool isAction = false) {
Text = text;
IsAction = isAction;
}
}
}