-
-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Add MessageCallData (#2934)
- Loading branch information
Showing
6 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace Discord; | ||
|
||
/// <summary> | ||
/// Represents the call data of a message. | ||
/// </summary> | ||
public readonly struct MessageCallData | ||
{ | ||
/// <summary> | ||
/// Gets the participants of the call. | ||
/// </summary> | ||
public readonly ulong[] Participants; | ||
|
||
/// <summary> | ||
/// Gets the timestamp when the call ended. This is <see langword="null"/> if the call is still ongoing. | ||
/// </summary> | ||
public readonly DateTimeOffset? EndedTimestamp; | ||
|
||
internal MessageCallData(ulong[] participants, DateTimeOffset? endedTimestamp) | ||
{ | ||
Participants = participants; | ||
EndedTimestamp = endedTimestamp; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Discord.API; | ||
|
||
internal class MessageCallData | ||
{ | ||
[JsonProperty("ended_timestamp")] | ||
public Optional<DateTimeOffset> EndedTimestamp { get; set; } | ||
|
||
[JsonProperty("participants")] | ||
public ulong[] Participants { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters