sharp-chat/SharpChatCommon/Events/MessageAddEventData.cs

18 lines
457 B
C#
Raw Permalink Normal View History

2024-05-24 03:44:20 +00:00
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;
}
}
}