sharp-chat/SharpChat/Events/UserChannelLeaveEvent.cs

29 lines
775 B
C#
Raw Normal View History

2022-08-30 15:00:58 +00:00
using System;
using System.Text.Json.Serialization;
namespace SharpChat.Events {
public class UserChannelLeaveEvent : IChatEvent {
[JsonIgnore]
public DateTimeOffset DateTime { get; set; }
[JsonIgnore]
public BasicUser Sender { get; set; }
[JsonIgnore]
2023-02-16 22:47:30 +00:00
public string ChannelName { get; set; }
2022-08-30 15:00:58 +00:00
[JsonIgnore]
public ChatMessageFlags Flags { get; set; } = ChatMessageFlags.Log;
[JsonIgnore]
public long SequenceId { get; set; }
public UserChannelLeaveEvent() { }
2023-02-16 22:47:30 +00:00
public UserChannelLeaveEvent(DateTimeOffset parted, BasicUser user, ChatChannel channel) {
2022-08-30 15:00:58 +00:00
DateTime = parted;
Sender = user;
2023-02-16 22:47:30 +00:00
ChannelName = channel.Name;
2022-08-30 15:00:58 +00:00
}
}
}