[Feature] Add MessageCallData (#2934)

This commit is contained in:
Mihail Gribkov
2024-06-14 11:23:34 +03:00
committed by GitHub
parent 35b102a7c0
commit 21195a8a93
6 changed files with 58 additions and 0 deletions

View File

@@ -87,6 +87,9 @@ namespace Discord.WebSocket
/// <inheritdoc />
IThreadChannel IMessage.Thread => Thread;
/// <inheritdoc />
public MessageCallData? CallData { get; private set; }
/// <summary>
/// Returns all attachments included in this message.
/// </summary>
@@ -299,6 +302,9 @@ namespace Discord.WebSocket
SocketGuild guild = (Channel as SocketGuildChannel)?.Guild;
Thread = guild?.AddOrUpdateChannel(state, model.Thread.Value) as SocketThreadChannel;
}
if (model.Call.IsSpecified)
CallData = new MessageCallData(model.Call.Value.Participants, model.Call.Value.EndedTimestamp.ToNullable());
}
/// <inheritdoc />