yippee (#3021)
This commit is contained in:
@@ -14,6 +14,9 @@ namespace Discord.WebSocket
|
||||
public abstract class SocketChannel : SocketEntity<ulong>, IChannel
|
||||
{
|
||||
#region SocketChannel
|
||||
/// <inheritdoc />
|
||||
public ChannelType ChannelType { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets when the channel is created.
|
||||
/// </summary>
|
||||
@@ -38,7 +41,11 @@ namespace Discord.WebSocket
|
||||
_ => throw new InvalidOperationException($"Unexpected channel type: {model.Type}"),
|
||||
};
|
||||
}
|
||||
internal abstract void Update(ClientState state, Model model);
|
||||
|
||||
internal virtual void Update(ClientState state, Model model)
|
||||
{
|
||||
ChannelType = model.Type;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region User
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace Discord.WebSocket
|
||||
internal override void Update(ClientState state, Model model)
|
||||
{
|
||||
Recipient.Update(state, model.Recipients.Value[0]);
|
||||
base.Update(state, model);
|
||||
}
|
||||
internal static SocketDMChannel Create(DiscordSocketClient discord, ClientState state, ulong channelId, API.User recipient)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Discord.WebSocket
|
||||
}
|
||||
internal override void Update(ClientState state, Model model)
|
||||
{
|
||||
base.Update(state, model);
|
||||
if (model.Name.IsSpecified)
|
||||
Name = model.Name.Value;
|
||||
if (model.Icon.IsSpecified)
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
internal override void Update(ClientState state, Model model)
|
||||
{
|
||||
base.Update(state, model);
|
||||
Name = model.Name.Value;
|
||||
Position = model.Position.GetValueOrDefault(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user