sharp-chat/SharpChatCommon/Events/UserUpdateEventData.cs

46 lines
1.2 KiB
C#
Raw Permalink Normal View History

using System.Text.Json.Serialization;
namespace SharpChat.Events {
[ChatEventDataFor("user:update")]
public class UserUpdateEventData : ChatEventData {
[JsonPropertyName("notify")]
public bool Notify { get; }
[JsonPropertyName("name")]
public string? Name { get; }
[JsonPropertyName("colour")]
public int? Colour { get; }
[JsonPropertyName("rank")]
public int? Rank { get; }
[JsonPropertyName("perms")]
public UserPermissions? Perms { get; }
[JsonPropertyName("nick")]
public string? NickName { get; }
[JsonPropertyName("super")]
public bool? IsSuper { get; }
public UserUpdateEventData(
string? name = null,
int? colour = null,
int? rank = null,
UserPermissions? perms = null,
string? nickName = null,
bool? isSuper = null,
bool notify = false
) {
Notify = notify;
Name = name;
Colour = colour;
Rank = rank;
Perms = perms;
NickName = nickName;
IsSuper = isSuper;
}
}
}