using System; namespace axXez.TS3.Protocol { /// Fired when a client leaves the bot's visible view (disconnects, is kicked, banned, or moves out of a subscribed channel). public class ClientLeftViewArgs : TsEntity { /// ID of the channel the client left. [TsField("cfid")] public int SourceChannelID { get; private set; } /// ID of the channel the client moved to; 0 if the client disconnected. [TsField("ctid")] public int TargetChannelID { get; private set; } /// Reason the client left the view. [TsField("reasonid")] public EventReason ReasonID { get; private set; } /// Client who performed the kick or ban, if applicable. [TsField] public InvokerInfo InvokerInfo { get; private set; } /// Human-readable reason message provided by the invoker or client. [TsField("reasonmsg")] public string ReasonMessage { get; private set; } /// Duration of the ban in seconds; 0 means permanent. Only present for bans (reasonid=6). [TsField("bantime")] public int BanTimeSeconds { get; private set; } /// Duration of the ban; if not a ban. public TimeSpan BanTime => TimeSpan.FromSeconds(BanTimeSeconds); /// Client ID of the client who left. [TsField("clid")] public int ClientID { get; private set; } internal ClientLeftViewArgs(TsDataEntry data) : base(data) { } } }