Browse Source

Fix merge bugs

pull/1923/head
quin lynch 4 years ago
parent
commit
f11109dc3d
6 changed files with 758 additions and 363 deletions
  1. +343
    -156
      src/Discord.Net.Core/Discord.Net.Core.xml
  2. +121
    -63
      src/Discord.Net.Rest/Discord.Net.Rest.xml
  3. +5
    -0
      src/Discord.Net.Rest/DiscordRestClient.cs
  4. +1
    -6
      src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs
  5. +287
    -138
      src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml
  6. +1
    -0
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 343
- 156
src/Discord.Net.Core/Discord.Net.Core.xml View File

@@ -392,18 +392,6 @@
the API version it uses on startup. the API version it uses on startup.
</remarks> </remarks>
</member> </member>
<member name="P:Discord.DiscordConfig.RateLimitPrecision">
<summary>
Gets or sets the level of precision of the rate limit reset response.
</summary>
<remarks>
If set to <see cref="F:Discord.RateLimitPrecision.Second"/>, this value will be rounded up to the
nearest second.
</remarks>
<returns>
The currently set <see cref="P:Discord.DiscordConfig.RateLimitPrecision"/>.
</returns>
</member>
<member name="P:Discord.DiscordConfig.UseSystemClock"> <member name="P:Discord.DiscordConfig.UseSystemClock">
<summary> <summary>
Gets or sets whether or not rate-limits should use the system clock. Gets or sets whether or not rate-limits should use the system clock.
@@ -1690,6 +1678,21 @@
A task that represents the asynchronous removal operation. A task that represents the asynchronous removal operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IMessageChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<summary>
Modifies a message.
</summary>
<remarks>
This method modifies this message with the specified properties. To see an example of this
method and what properties are available, please refer to <see cref="T:Discord.MessageProperties"/>.
</remarks>
<param name="messageId">The snowflake identifier of the message that would be changed.</param>
<param name="func">A delegate containing the properties to modify the message with.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous modification operation.
</returns>
</member>
<member name="M:Discord.IMessageChannel.TriggerTypingAsync(Discord.RequestOptions)"> <member name="M:Discord.IMessageChannel.TriggerTypingAsync(Discord.RequestOptions)">
<summary> <summary>
Broadcasts the "user is typing" message to all users in this channel, lasting 10 seconds. Broadcasts the "user is typing" message to all users in this channel, lasting 10 seconds.
@@ -2282,26 +2285,6 @@
<member name="F:Discord.ExplicitContentFilterLevel.AllMembers"> <member name="F:Discord.ExplicitContentFilterLevel.AllMembers">
<summary> Scan messages sent by all guild members. </summary> <summary> Scan messages sent by all guild members. </summary>
</member> </member>
<member name="T:Discord.GuildEmbedProperties">
<summary>
Provides properties that are used to modify the widget of an <see cref="T:Discord.IGuild" /> with the specified changes.
</summary>
</member>
<member name="P:Discord.GuildEmbedProperties.Enabled">
<summary>
Sets whether the widget should be enabled.
</summary>
</member>
<member name="P:Discord.GuildEmbedProperties.Channel">
<summary>
Sets the channel that the invite should place its users in, if not <c>null</c>.
</summary>
</member>
<member name="P:Discord.GuildEmbedProperties.ChannelId">
<summary>
Sets the channel the invite should place its users in, if not <c>null</c>.
</summary>
</member>
<member name="T:Discord.GuildIntegrationProperties"> <member name="T:Discord.GuildIntegrationProperties">
<summary> <summary>
Provides properties used to modify an <see cref="T:Discord.IGuildIntegration" /> with the specified changes. Provides properties used to modify an <see cref="T:Discord.IGuildIntegration" /> with the specified changes.
@@ -2511,14 +2494,6 @@
and moved into the AFK voice channel. and moved into the AFK voice channel.
</returns> </returns>
</member> </member>
<member name="P:Discord.IGuild.IsEmbeddable">
<summary>
Gets a value that indicates whether this guild is embeddable (i.e. can use widget).
</summary>
<returns>
<see langword="true" /> if this guild has a widget enabled; otherwise <see langword="false" />.
</returns>
</member>
<member name="P:Discord.IGuild.IsWidgetEnabled"> <member name="P:Discord.IGuild.IsWidgetEnabled">
<summary> <summary>
Gets a value that indicates whether this guild has the widget enabled. Gets a value that indicates whether this guild has the widget enabled.
@@ -2628,31 +2603,6 @@
none is set. none is set.
</returns> </returns>
</member> </member>
<member name="P:Discord.IGuild.DefaultChannelId">
<summary>
Gets the ID of the default channel for this guild.
</summary>
<remarks>
This property retrieves the snowflake identifier of the first viewable text channel for this guild.
<note type="warning">
This channel does not guarantee the user can send message to it, as it only looks for the first viewable
text channel.
</note>
</remarks>
<returns>
A <see langword="ulong"/> representing the snowflake identifier of the default text channel; <c>0</c> if
none can be found.
</returns>
</member>
<member name="P:Discord.IGuild.EmbedChannelId">
<summary>
Gets the ID of the widget embed channel of this guild.
</summary>
<returns>
A <see langword="ulong"/> representing the snowflake identifier of the embedded channel found within the
widget settings of this guild; <see langword="null" /> if none is set.
</returns>
</member>
<member name="P:Discord.IGuild.WidgetChannelId"> <member name="P:Discord.IGuild.WidgetChannelId">
<summary> <summary>
Gets the ID of the channel assigned to the widget of this guild. Gets the ID of the channel assigned to the widget of this guild.
@@ -2886,16 +2836,6 @@
A task that represents the asynchronous modification operation. A task that represents the asynchronous modification operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuild.ModifyEmbedAsync(System.Action{Discord.GuildEmbedProperties},Discord.RequestOptions)">
<summary>
Modifies this guild's embed channel.
</summary>
<param name="func">The delegate containing the properties to modify the guild widget with.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous modification operation.
</returns>
</member>
<member name="M:Discord.IGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)"> <member name="M:Discord.IGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)">
<summary> <summary>
Modifies this guild's widget. Modifies this guild's widget.
@@ -3133,17 +3073,6 @@
channel in this guild; <see langword="null" /> if none is found. channel in this guild; <see langword="null" /> if none is found.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuild.GetEmbedChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<summary>
Gets the embed channel (i.e. the channel set in the guild's widget settings) in this guild.
</summary>
<param name="mode">The <see cref="T:Discord.CacheMode" /> that determines whether the object should be fetched from cache.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous get operation. The task result contains the embed channel set
within the server's widget settings; <see langword="null" /> if none is set.
</returns>
</member>
<member name="M:Discord.IGuild.GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)"> <member name="M:Discord.IGuild.GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<summary> <summary>
Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild. Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.
@@ -3443,6 +3372,16 @@
of webhooks found within the guild. of webhooks found within the guild.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuild.GetEmotesAsync(Discord.RequestOptions)">
<summary>
Gets a collection of emotes from this guild.
</summary>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous get operation. The task result contains a read-only collection
of emotes found within the guild.
</returns>
</member>
<member name="M:Discord.IGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.IGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)">
<summary> <summary>
Gets a specific emote from this guild. Gets a specific emote from this guild.
@@ -4829,6 +4768,14 @@
A string containing the full invite URL (e.g. <c>https://discord.gg/FTqNnyS</c>). A string containing the full invite URL (e.g. <c>https://discord.gg/FTqNnyS</c>).
</returns> </returns>
</member> </member>
<member name="P:Discord.IInvite.Inviter">
<summary>
Gets the user that created this invite.
</summary>
<returns>
A user that created this invite.
</returns>
</member>
<member name="P:Discord.IInvite.Channel"> <member name="P:Discord.IInvite.Channel">
<summary> <summary>
Gets the channel this invite is linked to. Gets the channel this invite is linked to.
@@ -4900,26 +4847,26 @@
invite points to; <c>null</c> if one cannot be obtained. invite points to; <c>null</c> if one cannot be obtained.
</returns> </returns>
</member> </member>
<member name="T:Discord.IInviteMetadata">
<member name="P:Discord.IInvite.TargetUser">
<summary> <summary>
Represents additional information regarding the generic invite object.
Gets the user this invite is linked to via <see cref="P:Discord.IInvite.TargetUserType"/>.
</summary> </summary>
<returns>
A user that is linked to this invite.
</returns>
</member> </member>
<member name="P:Discord.IInviteMetadata.Inviter">
<member name="P:Discord.IInvite.TargetUserType">
<summary> <summary>
Gets the user that created this invite.
Gets the type of the linked <see cref="P:Discord.IInvite.TargetUser"/> for this invite.
</summary> </summary>
<returns> <returns>
A user that created this invite.
The type of the linked user that is linked to this invite.
</returns> </returns>
</member> </member>
<member name="P:Discord.IInviteMetadata.IsRevoked">
<member name="T:Discord.IInviteMetadata">
<summary> <summary>
Gets a value that indicates whether the invite has been revoked.
Represents additional information regarding the generic invite object.
</summary> </summary>
<returns>
<c>true</c> if this invite was revoked; otherwise <c>false</c>.
</returns>
</member> </member>
<member name="P:Discord.IInviteMetadata.IsTemporary"> <member name="P:Discord.IInviteMetadata.IsTemporary">
<summary> <summary>
@@ -6211,10 +6158,10 @@
Gets all embeds included in this message. Gets all embeds included in this message.
</summary> </summary>
<remarks> <remarks>
</remarks>
This property gets a read-only collection of embeds associated with this message. Depending on the This property gets a read-only collection of embeds associated with this message. Depending on the
message, a sent message may contain one or more embeds. This is usually true when multiple link previews message, a sent message may contain one or more embeds. This is usually true when multiple link previews
are generated; however, only one <see cref="F:Discord.EmbedType.Rich"/> <see cref="T:Discord.Embed"/> can be featured. are generated; however, only one <see cref="F:Discord.EmbedType.Rich"/> <see cref="T:Discord.Embed"/> can be featured.
</remarks>
<returns> <returns>
A read-only collection of embed objects. A read-only collection of embed objects.
</returns> </returns>
@@ -6293,6 +6240,18 @@
The <see cref="T:Discord.IMessageComponent"/>'s attached to this message The <see cref="T:Discord.IMessageComponent"/>'s attached to this message
</summary> </summary>
</member> </member>
<!-- Badly formed XML comment ignored for member "P:Discord.IMessage.Stickers" -->
<member name="P:Discord.IMessage.Flags">
<summary>
Gets the flags related to this message.
</summary>
<remarks>
This value is determined by bitwise OR-ing <see cref="T:Discord.MessageFlags"/> values together.
</remarks>
<returns>
A message's flags, if any is associated.
</returns>
</member>
<member name="M:Discord.IMessage.AddReactionAsync(Discord.IEmote,Discord.RequestOptions)"> <member name="M:Discord.IMessage.AddReactionAsync(Discord.IEmote,Discord.RequestOptions)">
<summary> <summary>
Adds a reaction to this message. Adds a reaction to this message.
@@ -6410,6 +6369,75 @@
The <see cref="T:Discord.IEmote" /> used in the reaction. The <see cref="T:Discord.IEmote" /> used in the reaction.
</summary> </summary>
</member> </member>
<member name="T:Discord.ISticker">
<summary>
Represents a discord sticker.
</summary>
</member>
<member name="P:Discord.ISticker.Id">
<summary>
Gets the ID of this sticker.
</summary>
<returns>
A snowflake ID associated with this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.PackId">
<summary>
Gets the ID of the pack of this sticker.
</summary>
<returns>
A snowflake ID associated with the pack of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.Name">
<summary>
Gets the name of this sticker.
</summary>
<returns>
A <see langword="string"/> with the name of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.Description">
<summary>
Gets the description of this sticker.
</summary>
<returns>
A <see langword="string"/> with the description of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.Tags">
<summary>
Gets the list of tags of this sticker.
</summary>
<returns>
A read-only list with the tags of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.Asset">
<summary>
Gets the asset hash of this sticker.
</summary>
<returns>
A <see langword="string"/> with the asset hash of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.PreviewAsset">
<summary>
Gets the preview asset hash of this sticker.
</summary>
<returns>
A <see langword="string"/> with the preview asset hash of this sticker.
</returns>
</member>
<member name="P:Discord.ISticker.FormatType">
<summary>
Gets the format type of this sticker.
</summary>
<returns>
A <see cref="T:Discord.StickerFormatType"/> with the format type of this sticker.
</returns>
</member>
<member name="T:Discord.ISystemMessage"> <member name="T:Discord.ISystemMessage">
<summary> <summary>
Represents a generic message sent by the system. Represents a generic message sent by the system.
@@ -6448,19 +6476,6 @@
A task that represents the asynchronous modification operation. A task that represents the asynchronous modification operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IUserMessage.ModifySuppressionAsync(System.Boolean,Discord.RequestOptions)">
<summary>
Modifies the suppression of this message.
</summary>
<remarks>
This method modifies whether or not embeds in this message are suppressed (hidden).
</remarks>
<param name="suppressEmbeds">Whether or not embeds in this message should be suppressed.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous modification operation.
</returns>
</member>
<member name="M:Discord.IUserMessage.PinAsync(Discord.RequestOptions)"> <member name="M:Discord.IUserMessage.PinAsync(Discord.RequestOptions)">
<summary> <summary>
Adds this message to its channel's pinned messages. Adds this message to its channel's pinned messages.
@@ -6556,6 +6571,39 @@
Gets the name of the application. Gets the name of the application.
</summary> </summary>
</member> </member>
<member name="F:Discord.MessageFlags.None">
<summary>
Default value for flags, when none are given to a message.
</summary>
</member>
<member name="F:Discord.MessageFlags.Crossposted">
<summary>
Flag given to messages that have been published to subscribed
channels (via Channel Following).
</summary>
</member>
<member name="F:Discord.MessageFlags.IsCrosspost">
<summary>
Flag given to messages that originated from a message in another
channel (via Channel Following).
</summary>
</member>
<member name="F:Discord.MessageFlags.SuppressEmbeds">
<summary>
Flag given to messages that do not display any embeds.
</summary>
</member>
<member name="F:Discord.MessageFlags.SourceMessageDeleted">
<summary>
Flag given to messages that the source message for this crosspost
has been deleted (via Channel Following).
</summary>
</member>
<member name="F:Discord.MessageFlags.Urgent">
<summary>
Flag given to messages that came from the urgent message system.
</summary>
</member>
<member name="T:Discord.MessageProperties"> <member name="T:Discord.MessageProperties">
<summary> <summary>
Properties that are used to modify an <see cref="T:Discord.IUserMessage" /> with the specified changes. Properties that are used to modify an <see cref="T:Discord.IUserMessage" /> with the specified changes.
@@ -6584,6 +6632,20 @@
Gets or sets the components for this message. Gets or sets the components for this message.
</summary> </summary>
</member> </member>
<member name="P:Discord.MessageProperties.Flags">
<summary>
Gets or sets the flags of the message.
</summary>
<remarks>
Only <see cref="F:Discord.MessageFlags.SuppressEmbeds"/> can be set/unset and you need to be
the author of the message.
</remarks>
</member>
<member name="P:Discord.MessageProperties.AllowedMentions">
<summary>
Gets or sets the allowed mentions of the message.
</summary>
</member>
<member name="T:Discord.MessageReference"> <member name="T:Discord.MessageReference">
<summary> <summary>
Contains the IDs sent from a crossposted message or inline reply. Contains the IDs sent from a crossposted message or inline reply.
@@ -6720,9 +6782,6 @@
<summary> <summary>
The message is an inline reply. The message is an inline reply.
</summary> </summary>
<remarks>
Only available in API v8.
</remarks>
</member> </member>
<member name="F:Discord.MessageType.ApplicationCommand"> <member name="F:Discord.MessageType.ApplicationCommand">
<summary> <summary>
@@ -6753,6 +6812,21 @@
<c>true</c> if the user has reacted to the message; otherwise <c>false</c>. <c>true</c> if the user has reacted to the message; otherwise <c>false</c>.
</returns> </returns>
</member> </member>
<member name="T:Discord.StickerFormatType">
<summary> Defines the types of formats for stickers. </summary>
</member>
<member name="F:Discord.StickerFormatType.None">
<summary> Default value for a sticker format type. </summary>
</member>
<member name="F:Discord.StickerFormatType.Png">
<summary> The sticker format type is png. </summary>
</member>
<member name="F:Discord.StickerFormatType.Apng">
<summary> The sticker format type is apng. </summary>
</member>
<member name="F:Discord.StickerFormatType.Lottie">
<summary> The sticker format type is lottie. </summary>
</member>
<member name="T:Discord.TagHandling"> <member name="T:Discord.TagHandling">
<summary> <summary>
Specifies the handling type the tag should use. Specifies the handling type the tag should use.
@@ -6876,11 +6950,6 @@
Allows for the addition of reactions to messages. Allows for the addition of reactions to messages.
</summary> </summary>
</member> </member>
<member name="F:Discord.ChannelPermission.ReadMessages">
<summary>
Allows for reading of messages. This flag is obsolete, use <see cref = "F:Discord.ChannelPermission.ViewChannel" /> instead.
</summary>
</member>
<member name="F:Discord.ChannelPermission.ViewChannel"> <member name="F:Discord.ChannelPermission.ViewChannel">
<summary> <summary>
Allows guild members to view a channel, which includes reading messages in text channels. Allows guild members to view a channel, which includes reading messages in text channels.
@@ -7007,9 +7076,6 @@
<member name="P:Discord.ChannelPermissions.AddReactions"> <member name="P:Discord.ChannelPermissions.AddReactions">
<summary> If <c>true</c>, a user may add reactions. </summary> <summary> If <c>true</c>, a user may add reactions. </summary>
</member> </member>
<member name="P:Discord.ChannelPermissions.ReadMessages">
<summary> If <c>true</c>, a user may join channels. </summary>
</member>
<member name="P:Discord.ChannelPermissions.ViewChannel"> <member name="P:Discord.ChannelPermissions.ViewChannel">
<summary> If <c>true</c>, a user may view channels. </summary> <summary> If <c>true</c>, a user may view channels. </summary>
</member> </member>
@@ -7320,9 +7386,6 @@
<member name="P:Discord.GuildPermissions.ViewGuildInsights"> <member name="P:Discord.GuildPermissions.ViewGuildInsights">
<summary> If <c>true</c>, a user may view the guild insights. </summary> <summary> If <c>true</c>, a user may view the guild insights. </summary>
</member> </member>
<member name="P:Discord.GuildPermissions.ReadMessages">
<summary> If True, a user may join channels. </summary>
</member>
<member name="P:Discord.GuildPermissions.ViewChannel"> <member name="P:Discord.GuildPermissions.ViewChannel">
<summary> If True, a user may view channels. </summary> <summary> If True, a user may view channels. </summary>
</member> </member>
@@ -7392,6 +7455,9 @@
<member name="M:Discord.GuildPermissions.#ctor(System.UInt64)"> <member name="M:Discord.GuildPermissions.#ctor(System.UInt64)">
<summary> Creates a new <see cref="T:Discord.GuildPermissions"/> with the provided packed value. </summary> <summary> Creates a new <see cref="T:Discord.GuildPermissions"/> with the provided packed value. </summary>
</member> </member>
<member name="M:Discord.GuildPermissions.#ctor(System.String)">
<summary> Creates a new <see cref="T:Discord.GuildPermissions"/> with the provided packed value after converting to ulong. </summary>
</member>
<member name="M:Discord.GuildPermissions.#ctor(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)"> <member name="M:Discord.GuildPermissions.#ctor(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)">
<summary> Creates a new <see cref="T:Discord.GuildPermissions"/> structure with the provided permissions. </summary> <summary> Creates a new <see cref="T:Discord.GuildPermissions"/> structure with the provided permissions. </summary>
</member> </member>
@@ -7479,9 +7545,6 @@
<member name="P:Discord.OverwritePermissions.AddReactions"> <member name="P:Discord.OverwritePermissions.AddReactions">
<summary> If Allowed, a user may add reactions. </summary> <summary> If Allowed, a user may add reactions. </summary>
</member> </member>
<member name="P:Discord.OverwritePermissions.ReadMessages">
<summary> If Allowed, a user may join channels. </summary>
</member>
<member name="P:Discord.OverwritePermissions.ViewChannel"> <member name="P:Discord.OverwritePermissions.ViewChannel">
<summary> If Allowed, a user may join channels. </summary> <summary> If Allowed, a user may join channels. </summary>
</member> </member>
@@ -7542,6 +7605,9 @@
<member name="M:Discord.OverwritePermissions.#ctor(System.UInt64,System.UInt64)"> <member name="M:Discord.OverwritePermissions.#ctor(System.UInt64,System.UInt64)">
<summary> Creates a new OverwritePermissions with the provided allow and deny packed values. </summary> <summary> Creates a new OverwritePermissions with the provided allow and deny packed values. </summary>
</member> </member>
<member name="M:Discord.OverwritePermissions.#ctor(System.String,System.String)">
<summary> Creates a new OverwritePermissions with the provided allow and deny packed values after converting to ulong. </summary>
</member>
<member name="M:Discord.OverwritePermissions.#ctor(Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue)"> <member name="M:Discord.OverwritePermissions.#ctor(Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue,Discord.PermValue)">
<summary> <summary>
Initializes a new <see cref="T:Discord.ChannelPermissions"/> struct with the provided permissions. Initializes a new <see cref="T:Discord.ChannelPermissions"/> struct with the provided permissions.
@@ -7818,6 +7884,14 @@
An <see cref="T:System.Int32"/> representing the position of the role in the role list of the guild. An <see cref="T:System.Int32"/> representing the position of the role in the role list of the guild.
</returns> </returns>
</member> </member>
<member name="P:Discord.IRole.Tags">
<summary>
Gets the tags related to this role.
</summary>
<returns>
A <see cref="T:Discord.RoleTags"/> object containing all tags related to this role.
</returns>
</member>
<member name="M:Discord.IRole.ModifyAsync(System.Action{Discord.RoleProperties},Discord.RequestOptions)"> <member name="M:Discord.IRole.ModifyAsync(System.Action{Discord.RoleProperties},Discord.RequestOptions)">
<summary> <summary>
Modifies this role. Modifies this role.
@@ -7923,6 +7997,38 @@
This value may not be set if the role is an @everyone role. This value may not be set if the role is an @everyone role.
</remarks> </remarks>
</member> </member>
<member name="T:Discord.RoleTags">
<summary>
Provides tags related to a discord role.
</summary>
</member>
<member name="P:Discord.RoleTags.BotId">
<summary>
Gets the identifier of the bot that this role belongs to, if it does.
</summary>
<returns>
A <see langword="ulong"/> if this role belongs to a bot; otherwise
<see langword="null"/>.
</returns>
</member>
<member name="P:Discord.RoleTags.IntegrationId">
<summary>
Gets the identifier of the integration that this role belongs to, if it does.
</summary>
<returns>
A <see langword="ulong"/> if this role belongs to an integration; otherwise
<see langword="null"/>.
</returns>
</member>
<member name="P:Discord.RoleTags.IsPremiumSubscriberRole">
<summary>
Gets if this role is the guild's premium subscriber (booster) role.
</summary>
<returns>
<see langword="true"/> if this role is the guild's premium subscriber role;
otherwise <see langword="false"/>.
</returns>
</member>
<member name="T:Discord.ITeam"> <member name="T:Discord.ITeam">
<summary> <summary>
Represents a Discord Team. Represents a Discord Team.
@@ -8234,6 +8340,11 @@
this user possesses. this user possesses.
</returns> </returns>
</member> </member>
<member name="P:Discord.IGuildUser.IsPending">
<summary>
Whether the user has passed the guild's Membership Screening requirements.
</summary>
</member>
<member name="M:Discord.IGuildUser.GetPermissions(Discord.IGuildChannel)"> <member name="M:Discord.IGuildUser.GetPermissions(Discord.IGuildChannel)">
<summary> <summary>
Gets the level permissions granted to this user to a given channel. Gets the level permissions granted to this user to a given channel.
@@ -8276,6 +8387,16 @@
A task that represents the asynchronous modification operation. A task that represents the asynchronous modification operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuildUser.AddRoleAsync(System.UInt64,Discord.RequestOptions)">
<summary>
Adds the specified role to this user in the guild.
</summary>
<param name="roleId">The role to be added to the user.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous role addition operation.
</returns>
</member>
<member name="M:Discord.IGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.IGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)">
<summary> <summary>
Adds the specified role to this user in the guild. Adds the specified role to this user in the guild.
@@ -8286,6 +8407,16 @@
A task that represents the asynchronous role addition operation. A task that represents the asynchronous role addition operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<summary>
Adds the specified <paramref name="roleIds"/> to this user in the guild.
</summary>
<param name="roleIds">The roles to be added to the user.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous role addition operation.
</returns>
</member>
<member name="M:Discord.IGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.IGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<summary> <summary>
Adds the specified <paramref name="roles"/> to this user in the guild. Adds the specified <paramref name="roles"/> to this user in the guild.
@@ -8296,6 +8427,16 @@
A task that represents the asynchronous role addition operation. A task that represents the asynchronous role addition operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuildUser.RemoveRoleAsync(System.UInt64,Discord.RequestOptions)">
<summary>
Removes the specified <paramref name="roleId"/> from this user in the guild.
</summary>
<param name="roleId">The role to be removed from the user.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous role removal operation.
</returns>
</member>
<member name="M:Discord.IGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.IGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)">
<summary> <summary>
Removes the specified <paramref name="role"/> from this user in the guild. Removes the specified <paramref name="role"/> from this user in the guild.
@@ -8306,6 +8447,16 @@
A task that represents the asynchronous role removal operation. A task that represents the asynchronous role removal operation.
</returns> </returns>
</member> </member>
<member name="M:Discord.IGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<summary>
Removes the specified <paramref name="roleIds"/> from this user in the guild.
</summary>
<param name="roleIds">The roles to be removed from the user.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous role removal operation.
</returns>
</member>
<member name="M:Discord.IGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.IGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<summary> <summary>
Removes the specified <paramref name="roles"/> from this user in the guild. Removes the specified <paramref name="roles"/> from this user in the guild.
@@ -8321,11 +8472,6 @@
Represents the user's presence status. This may include their online status and their activity. Represents the user's presence status. This may include their online status and their activity.
</summary> </summary>
</member> </member>
<member name="P:Discord.IPresence.Activity">
<summary>
Gets the activity this user is currently doing.
</summary>
</member>
<member name="P:Discord.IPresence.Status"> <member name="P:Discord.IPresence.Status">
<summary> <summary>
Gets the current status of this user. Gets the current status of this user.
@@ -8484,9 +8630,20 @@
Gets the username for this user. Gets the username for this user.
</summary> </summary>
</member> </member>
<member name="M:Discord.IUser.GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="P:Discord.IUser.PublicFlags">
<summary>
Gets the public flags that are applied to this user's account.
</summary>
<remarks>
This value is determined by bitwise OR-ing <see cref="T:Discord.UserProperties"/> values together.
</remarks>
<returns>
The value of public flags for this user.
</returns>
</member>
<member name="M:Discord.IUser.CreateDMChannelAsync(Discord.RequestOptions)">
<summary> <summary>
Gets the direct message channel of this user, or create one if it does not already exist.
Creates the direct message channel of this user.
</summary> </summary>
<remarks> <remarks>
This method is used to obtain or create a channel used to send a direct message. This method is used to obtain or create a channel used to send a direct message.
@@ -8501,7 +8658,7 @@
<example> <example>
<para>The following example attempts to send a direct message to the target user and logs the incident should <para>The following example attempts to send a direct message to the target user and logs the incident should
it fail.</para> it fail.</para>
<code region="GetOrCreateDMChannelAsync" language="cs"
<code region="CreateDMChannelAsync" language="cs"
source="../../../Discord.Net.Examples/Core/Entities/Users/IUser.Examples.cs"/> source="../../../Discord.Net.Examples/Core/Entities/Users/IUser.Examples.cs"/>
</example> </example>
<param name="options">The options to be used when sending the request.</param> <param name="options">The options to be used when sending the request.</param>
@@ -8629,17 +8786,22 @@
</member> </member>
<member name="F:Discord.UserProperties.Staff"> <member name="F:Discord.UserProperties.Staff">
<summary> <summary>
Flag given to Discord staff.
Flag given to users who are a Discord employee.
</summary> </summary>
</member> </member>
<member name="F:Discord.UserProperties.Partner"> <member name="F:Discord.UserProperties.Partner">
<summary> <summary>
Flag given to Discord partners.
Flag given to users who are owners of a partnered Discord server.
</summary> </summary>
</member> </member>
<member name="F:Discord.UserProperties.BugHunter">
<member name="F:Discord.UserProperties.HypeSquadEvents">
<summary> <summary>
Flag given to users who have participated in the bug report program.
Flag given to users in HypeSquad events.
</summary>
</member>
<member name="F:Discord.UserProperties.BugHunterLevel1">
<summary>
Flag given to users who have participated in the bug report program and are level 1.
</summary> </summary>
</member> </member>
<member name="F:Discord.UserProperties.HypeSquadBravery"> <member name="F:Discord.UserProperties.HypeSquadBravery">
@@ -8662,6 +8824,36 @@
Flag given to users who subscribed to Nitro before games were added. Flag given to users who subscribed to Nitro before games were added.
</summary> </summary>
</member> </member>
<member name="F:Discord.UserProperties.TeamUser">
<summary>
Flag given to users who are part of a team.
</summary>
</member>
<member name="F:Discord.UserProperties.System">
<summary>
Flag given to users who represent Discord (System).
</summary>
</member>
<member name="F:Discord.UserProperties.BugHunterLevel2">
<summary>
Flag given to users who have participated in the bug report program and are level 2.
</summary>
</member>
<member name="F:Discord.UserProperties.VerifiedBot">
<summary>
Flag given to users who are verified bots.
</summary>
</member>
<member name="F:Discord.UserProperties.EarlyVerifiedBotDeveloper">
<summary>
Flag given to users that developed bots and early verified their accounts.
</summary>
</member>
<member name="F:Discord.UserProperties.DiscordCertifiedModerator">
<summary>
Flag given to users that are discord certified moderators who has give discord's exam.
</summary>
</member>
<member name="T:Discord.UserStatus"> <member name="T:Discord.UserStatus">
<summary> <summary>
Defines the available Discord user status. Defines the available Discord user status.
@@ -9199,6 +9391,17 @@
<member name="F:Discord.GatewayIntents.DirectMessageTyping"> <member name="F:Discord.GatewayIntents.DirectMessageTyping">
<summary> This intent includes TYPING_START </summary> <summary> This intent includes TYPING_START </summary>
</member> </member>
<member name="F:Discord.GatewayIntents.AllUnprivileged">
<summary>
This intent includes all but <see cref="F:Discord.GatewayIntents.GuildMembers"/> and <see cref="F:Discord.GatewayIntents.GuildMembers"/>
that are privileged must be enabled for the application.
</summary>
</member>
<member name="F:Discord.GatewayIntents.All">
<summary>
This intent includes all of them, including privileged ones.
</summary>
</member>
<member name="T:Discord.IDiscordClient"> <member name="T:Discord.IDiscordClient">
<summary> <summary>
Represents a generic Discord client. Represents a generic Discord client.
@@ -9838,22 +10041,6 @@
and an optional reason. and an optional reason.
</summary> </summary>
</member> </member>
<member name="T:Discord.RateLimitPrecision">
<summary>
Specifies the level of precision to request in the rate limit
response header.
</summary>
</member>
<member name="F:Discord.RateLimitPrecision.Second">
<summary>
Specifies precision rounded up to the nearest whole second
</summary>
</member>
<member name="F:Discord.RateLimitPrecision.Millisecond">
<summary>
Specifies precision rounded to the nearest millisecond.
</summary>
</member>
<member name="T:Discord.RequestOptions"> <member name="T:Discord.RequestOptions">
<summary> <summary>
Represents options that should be used when sending a request. Represents options that should be used when sending a request.
@@ -10456,7 +10643,7 @@
</summary> </summary>
<param name="value">The snowflake identifier to resolve.</param> <param name="value">The snowflake identifier to resolve.</param>
<returns> <returns>
A <see cref="T:System.DateTimeOffset" /> representing the time for when the object is geenrated.
A <see cref="T:System.DateTimeOffset" /> representing the time for when the object is generated.
</returns> </returns>
</member> </member>
<member name="M:Discord.SnowflakeUtils.ToSnowflake(System.DateTimeOffset)"> <member name="M:Discord.SnowflakeUtils.ToSnowflake(System.DateTimeOffset)">


+ 121
- 63
src/Discord.Net.Rest/Discord.Net.Rest.xml View File

@@ -29,7 +29,7 @@
Gets the name of the application. Gets the name of the application.
</summary> </summary>
</member> </member>
<member name="M:Discord.API.DiscordRestApiClient.#ctor(Discord.Net.Rest.RestClientProvider,System.String,Discord.RetryMode,Newtonsoft.Json.JsonSerializer,Discord.RateLimitPrecision,System.Boolean)">
<member name="M:Discord.API.DiscordRestApiClient.#ctor(Discord.Net.Rest.RestClientProvider,System.String,Discord.RetryMode,Newtonsoft.Json.JsonSerializer,System.Boolean)">
<exception cref="T:System.ArgumentException">Unknown OAuth token type.</exception> <exception cref="T:System.ArgumentException">Unknown OAuth token type.</exception>
</member> </member>
<member name="M:Discord.API.DiscordRestApiClient.SetBaseUrl(System.String)"> <member name="M:Discord.API.DiscordRestApiClient.SetBaseUrl(System.String)">
@@ -57,6 +57,13 @@
<exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception> <exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception>
<exception cref="T:System.InvalidOperationException">This operation may only be called with a <see cref="F:Discord.TokenType.Webhook"/> token.</exception> <exception cref="T:System.InvalidOperationException">This operation may only be called with a <see cref="F:Discord.TokenType.Webhook"/> token.</exception>
</member> </member>
<member name="M:Discord.API.DiscordRestApiClient.ModifyWebhookMessageAsync(System.UInt64,System.UInt64,Discord.API.Rest.ModifyWebhookMessageParams,Discord.RequestOptions)">
<exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception>
<exception cref="T:System.InvalidOperationException">This operation may only be called with a <see cref="F:Discord.TokenType.Webhook"/> token.</exception>
</member>
<member name="M:Discord.API.DiscordRestApiClient.DeleteWebhookMessageAsync(System.UInt64,System.UInt64,Discord.RequestOptions)">
<exception cref="T:System.InvalidOperationException">This operation may only be called with a <see cref="F:Discord.TokenType.Webhook"/> token.</exception>
</member>
<member name="M:Discord.API.DiscordRestApiClient.UploadFileAsync(System.UInt64,Discord.API.Rest.UploadFileParams,Discord.RequestOptions)"> <member name="M:Discord.API.DiscordRestApiClient.UploadFileAsync(System.UInt64,Discord.API.Rest.UploadFileParams,Discord.RequestOptions)">
<exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception> <exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception>
</member> </member>
@@ -78,13 +85,6 @@
<member name="M:Discord.API.DiscordRestApiClient.RemoveGuildBanAsync(System.UInt64,System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.API.DiscordRestApiClient.RemoveGuildBanAsync(System.UInt64,System.UInt64,Discord.RequestOptions)">
<exception cref="T:System.ArgumentException"><paramref name="guildId"/> and <paramref name="userId"/> must not be equal to zero.</exception> <exception cref="T:System.ArgumentException"><paramref name="guildId"/> and <paramref name="userId"/> must not be equal to zero.</exception>
</member> </member>
<member name="M:Discord.API.DiscordRestApiClient.GetGuildEmbedAsync(System.UInt64,Discord.RequestOptions)">
<exception cref="T:System.ArgumentException"><paramref name="guildId"/> must not be equal to zero.</exception>
</member>
<member name="M:Discord.API.DiscordRestApiClient.ModifyGuildEmbedAsync(System.UInt64,Discord.API.Rest.ModifyGuildEmbedParams,Discord.RequestOptions)">
<exception cref="T:System.ArgumentException"><paramref name="guildId"/> must not be equal to zero.</exception>
<exception cref="T:System.ArgumentNullException"><paramref name="args"/> must not be <see langword="null"/>.</exception>
</member>
<member name="M:Discord.API.DiscordRestApiClient.GetGuildWidgetAsync(System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.API.DiscordRestApiClient.GetGuildWidgetAsync(System.UInt64,Discord.RequestOptions)">
<exception cref="T:System.ArgumentException"><paramref name="guildId"/> must not be equal to zero.</exception> <exception cref="T:System.ArgumentException"><paramref name="guildId"/> must not be equal to zero.</exception>
</member> </member>
@@ -134,12 +134,6 @@
<member name="M:Discord.Net.Converters.ImageConverter.ReadJson(Newtonsoft.Json.JsonReader,System.Type,System.Object,Newtonsoft.Json.JsonSerializer)"> <member name="M:Discord.Net.Converters.ImageConverter.ReadJson(Newtonsoft.Json.JsonReader,System.Type,System.Object,Newtonsoft.Json.JsonSerializer)">
<exception cref="T:System.InvalidOperationException">Cannot read from image.</exception> <exception cref="T:System.InvalidOperationException">Cannot read from image.</exception>
</member> </member>
<member name="M:Discord.Net.Converters.PermissionTargetConverter.ReadJson(Newtonsoft.Json.JsonReader,System.Type,System.Object,Newtonsoft.Json.JsonSerializer)">
<exception cref="T:Newtonsoft.Json.JsonSerializationException">Unknown permission target.</exception>
</member>
<member name="M:Discord.Net.Converters.PermissionTargetConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
<exception cref="T:Newtonsoft.Json.JsonSerializationException">Invalid permission target.</exception>
</member>
<member name="P:Discord.Rest.BaseDiscordClient.LoginState"> <member name="P:Discord.Rest.BaseDiscordClient.LoginState">
<summary> <summary>
Gets the login state of the client. Gets the login state of the client.
@@ -505,6 +499,14 @@
<c>null</c> if this is not mentioned in this entry. <c>null</c> if this is not mentioned in this entry.
</returns> </returns>
</member> </member>
<member name="P:Discord.Rest.ChannelInfo.ChannelType">
<summary>
Gets the type of this channel.
</summary>
<returns>
The channel type of this channel; <c>null</c> if not applicable.
</returns>
</member>
<member name="T:Discord.Rest.ChannelUpdateAuditLogData"> <member name="T:Discord.Rest.ChannelUpdateAuditLogData">
<summary> <summary>
Contains a piece of audit log data related to a channel update. Contains a piece of audit log data related to a channel update.
@@ -1174,10 +1176,10 @@
</member> </member>
<member name="P:Discord.Rest.MessagePinAuditLogData.Target"> <member name="P:Discord.Rest.MessagePinAuditLogData.Target">
<summary> <summary>
Gets the user of the message that was pinned.
Gets the user of the message that was pinned if available.
</summary> </summary>
<returns> <returns>
A user object representing the user that created the pinned message.
A user object representing the user that created the pinned message or <see langword="null"/>.
</returns> </returns>
</member> </member>
<member name="T:Discord.Rest.MessageUnpinAuditLogData"> <member name="T:Discord.Rest.MessageUnpinAuditLogData">
@@ -1203,10 +1205,10 @@
</member> </member>
<member name="P:Discord.Rest.MessageUnpinAuditLogData.Target"> <member name="P:Discord.Rest.MessageUnpinAuditLogData.Target">
<summary> <summary>
Gets the user of the message that was unpinned.
Gets the user of the message that was unpinned if available.
</summary> </summary>
<returns> <returns>
A user object representing the user that created the unpinned message.
A user object representing the user that created the unpinned message or <see langword="null"/>.
</returns> </returns>
</member> </member>
<member name="T:Discord.Rest.OverwriteCreateAuditLogData"> <member name="T:Discord.Rest.OverwriteCreateAuditLogData">
@@ -1972,6 +1974,9 @@
<member name="M:Discord.Rest.RestDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestDMChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestDMChannel.TriggerTypingAsync(Discord.RequestOptions)"> <member name="M:Discord.Rest.RestDMChannel.TriggerTypingAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2063,6 +2068,9 @@
<member name="M:Discord.Rest.RestGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGroupChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGroupChannel.SendMessageAsync(System.String,System.Boolean,Discord.Embed,Discord.RequestOptions,Discord.AllowedMentions,Discord.MessageReference,Discord.MessageComponent)"> <member name="M:Discord.Rest.RestGroupChannel.SendMessageAsync(System.String,System.Boolean,Discord.Embed,Discord.RequestOptions,Discord.AllowedMentions,Discord.MessageReference,Discord.MessageComponent)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception> <exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception>
@@ -2356,6 +2364,9 @@
<member name="M:Discord.Rest.RestTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestTextChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestTextChannel.TriggerTypingAsync(Discord.RequestOptions)"> <member name="M:Discord.Rest.RestTextChannel.TriggerTypingAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2517,9 +2528,6 @@
<member name="M:Discord.Rest.GuildHelper.ModifyAsync(Discord.IGuild,Discord.Rest.BaseDiscordClient,System.Action{Discord.GuildProperties},Discord.RequestOptions)"> <member name="M:Discord.Rest.GuildHelper.ModifyAsync(Discord.IGuild,Discord.Rest.BaseDiscordClient,System.Action{Discord.GuildProperties},Discord.RequestOptions)">
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
</member> </member>
<member name="M:Discord.Rest.GuildHelper.ModifyEmbedAsync(Discord.IGuild,Discord.Rest.BaseDiscordClient,System.Action{Discord.GuildEmbedProperties},Discord.RequestOptions)">
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
</member>
<member name="M:Discord.Rest.GuildHelper.ModifyWidgetAsync(Discord.IGuild,Discord.Rest.BaseDiscordClient,System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)"> <member name="M:Discord.Rest.GuildHelper.ModifyWidgetAsync(Discord.IGuild,Discord.Rest.BaseDiscordClient,System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)">
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
</member> </member>
@@ -2576,9 +2584,6 @@
<member name="P:Discord.Rest.RestGuild.AFKTimeout"> <member name="P:Discord.Rest.RestGuild.AFKTimeout">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestGuild.IsEmbeddable">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.IsWidgetEnabled"> <member name="P:Discord.Rest.RestGuild.IsWidgetEnabled">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2597,9 +2602,6 @@
<member name="P:Discord.Rest.RestGuild.AFKChannelId"> <member name="P:Discord.Rest.RestGuild.AFKChannelId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestGuild.EmbedChannelId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.WidgetChannelId"> <member name="P:Discord.Rest.RestGuild.WidgetChannelId">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2724,10 +2726,6 @@
<inheritdoc /> <inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</member> </member>
<member name="M:Discord.Rest.RestGuild.ModifyEmbedAsync(System.Action{Discord.GuildEmbedProperties},Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</member>
<member name="M:Discord.Rest.RestGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
@@ -2880,16 +2878,6 @@
channel in this guild; <see langword="null"/> if none is found. channel in this guild; <see langword="null"/> if none is found.
</returns> </returns>
</member> </member>
<member name="M:Discord.Rest.RestGuild.GetEmbedChannelAsync(Discord.RequestOptions)">
<summary>
Gets the embed channel (i.e. the channel set in the guild's widget settings) in this guild.
</summary>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous get operation. The task result contains the embed channel set
within the server's widget settings; <see langword="null"/> if none is set.
</returns>
</member>
<member name="M:Discord.Rest.RestGuild.GetWidgetChannelAsync(Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuild.GetWidgetChannelAsync(Discord.RequestOptions)">
<summary> <summary>
Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild. Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.
@@ -3165,6 +3153,9 @@
The name of the guild. The name of the guild.
</returns> </returns>
</member> </member>
<member name="M:Discord.Rest.RestGuild.GetEmotesAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3226,9 +3217,6 @@
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetEmbedChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3518,6 +3506,15 @@
<member name="P:Discord.Rest.RestInvite.GuildId"> <member name="P:Discord.Rest.RestInvite.GuildId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestInvite.Inviter">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInvite.TargetUser">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInvite.TargetUserType">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInvite.Code"> <member name="P:Discord.Rest.RestInvite.Code">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3547,9 +3544,6 @@
<member name="T:Discord.Rest.RestInviteMetadata"> <member name="T:Discord.Rest.RestInviteMetadata">
<summary> Represents additional information regarding the REST-based invite object. </summary> <summary> Represents additional information regarding the REST-based invite object. </summary>
</member> </member>
<member name="P:Discord.Rest.RestInviteMetadata.IsRevoked">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInviteMetadata.IsTemporary"> <member name="P:Discord.Rest.RestInviteMetadata.IsTemporary">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3562,17 +3556,9 @@
<member name="P:Discord.Rest.RestInviteMetadata.Uses"> <member name="P:Discord.Rest.RestInviteMetadata.Uses">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestInviteMetadata.Inviter">
<summary>
Gets the user that created this invite.
</summary>
</member>
<member name="P:Discord.Rest.RestInviteMetadata.CreatedAt"> <member name="P:Discord.Rest.RestInviteMetadata.CreatedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestInviteMetadata.Discord#IInviteMetadata#Inviter">
<inheritdoc />
</member>
<member name="F:Discord.Rest.MessageHelper.InlineCodeRegex"> <member name="F:Discord.Rest.MessageHelper.InlineCodeRegex">
<summary> <summary>
Regex used to check if some text is formatted as inline code. Regex used to check if some text is formatted as inline code.
@@ -3714,6 +3700,9 @@
<member name="P:Discord.Rest.RestMessage.Tags"> <member name="P:Discord.Rest.RestMessage.Tags">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Timestamp"> <member name="P:Discord.Rest.RestMessage.Timestamp">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3726,6 +3715,9 @@
<member name="P:Discord.Rest.RestMessage.Reference"> <member name="P:Discord.Rest.RestMessage.Reference">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestMessage.Flags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Components"> <member name="P:Discord.Rest.RestMessage.Components">
<inheritdoc/> <inheritdoc/>
</member> </member>
@@ -3758,6 +3750,9 @@
<member name="P:Discord.Rest.RestMessage.Discord#IMessage#Components"> <member name="P:Discord.Rest.RestMessage.Discord#IMessage#Components">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="P:Discord.Rest.RestMessage.Discord#IMessage#Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Reactions"> <member name="P:Discord.Rest.RestMessage.Reactions">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3843,6 +3838,9 @@
<member name="P:Discord.Rest.RestUserMessage.Tags"> <member name="P:Discord.Rest.RestUserMessage.Tags">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestUserMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUserMessage.ReferencedMessage"> <member name="P:Discord.Rest.RestUserMessage.ReferencedMessage">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3855,9 +3853,6 @@
<member name="M:Discord.Rest.RestUserMessage.UnpinAsync(Discord.RequestOptions)"> <member name="M:Discord.Rest.RestUserMessage.UnpinAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestUserMessage.ModifySuppressionAsync(System.Boolean,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestUserMessage.Resolve(Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling)"> <member name="M:Discord.Rest.RestUserMessage.Resolve(Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3937,6 +3932,9 @@
<member name="P:Discord.Rest.RestRole.Position"> <member name="P:Discord.Rest.RestRole.Position">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestRole.Tags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestRole.CreatedAt"> <member name="P:Discord.Rest.RestRole.CreatedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4061,6 +4059,9 @@
<member name="P:Discord.Rest.RestGuildUser.GuildId"> <member name="P:Discord.Rest.RestGuildUser.GuildId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestGuildUser.IsPending">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuildUser.GuildPermissions"> <member name="P:Discord.Rest.RestGuildUser.GuildPermissions">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.InvalidOperationException" accessor="get">Resolving permissions requires the parent guild to be downloaded.</exception> <exception cref="T:System.InvalidOperationException" accessor="get">Resolving permissions requires the parent guild to be downloaded.</exception>
@@ -4080,15 +4081,27 @@
<member name="M:Discord.Rest.RestGuildUser.KickAsync(System.String,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuildUser.KickAsync(System.String,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGuildUser.AddRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGuildUser.RemoveRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4168,6 +4181,9 @@
<member name="P:Discord.Rest.RestUser.AvatarId"> <member name="P:Discord.Rest.RestUser.AvatarId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestUser.PublicFlags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUser.CreatedAt"> <member name="P:Discord.Rest.RestUser.CreatedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4195,9 +4211,9 @@
<member name="M:Discord.Rest.RestUser.UpdateAsync(Discord.RequestOptions)"> <member name="M:Discord.Rest.RestUser.UpdateAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestUser.GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.Rest.RestUser.CreateDMChannelAsync(Discord.RequestOptions)">
<summary> <summary>
Returns a direct message channel to this user, or create one if it does not already exist.
Creates a direct message channel to this user.
</summary> </summary>
<param name="options">The options to be used when sending the request.</param> <param name="options">The options to be used when sending the request.</param>
<returns> <returns>
@@ -4218,7 +4234,7 @@
A string that resolves to Username#Discriminator of the user. A string that resolves to Username#Discriminator of the user.
</returns> </returns>
</member> </member>
<member name="M:Discord.Rest.RestUser.Discord#IUser#GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.Rest.RestUser.Discord#IUser#CreateDMChannelAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestWebhookUser.WebhookId"> <member name="P:Discord.Rest.RestWebhookUser.WebhookId">
@@ -4245,6 +4261,9 @@
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#Nickname"> <member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#Nickname">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#IsPending">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#GuildPermissions"> <member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#GuildPermissions">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4257,15 +4276,27 @@
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#ModifyAsync(System.Action{Discord.GuildUserProperties},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#ModifyAsync(System.Action{Discord.GuildUserProperties},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4293,10 +4324,10 @@
<member name="P:Discord.Rest.RestWebhookUser.Discord#IVoiceState#IsStreaming"> <member name="P:Discord.Rest.RestWebhookUser.Discord#IVoiceState#IsStreaming">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestWebhook.ChannelId">
<member name="P:Discord.Rest.RestWebhook.Token">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestWebhook.Token">
<member name="P:Discord.Rest.RestWebhook.ChannelId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestWebhook.Name"> <member name="P:Discord.Rest.RestWebhook.Name">
@@ -4378,5 +4409,32 @@
A string containing the filename of this attachment. A string containing the filename of this attachment.
</returns> </returns>
</member> </member>
<member name="T:Discord.Sticker">
<inheritdoc cref="T:Discord.ISticker"/>
</member>
<member name="P:Discord.Sticker.Id">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.PackId">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.Name">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.Description">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.Tags">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.Asset">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.PreviewAsset">
<inheritdoc />
</member>
<member name="P:Discord.Sticker.FormatType">
<inheritdoc />
</member>
</members> </members>
</doc> </doc>

+ 5
- 0
src/Discord.Net.Rest/DiscordRestClient.cs View File

@@ -46,6 +46,11 @@ namespace Discord.Rest
ApiClient.CurrentUserId = user.Id; ApiClient.CurrentUserId = user.Id;
base.CurrentUser = RestSelfUser.Create(this, user); base.CurrentUser = RestSelfUser.Create(this, user);
} }

internal void CreateRestSelfUser(API.User user)
{
base.CurrentUser = RestSelfUser.Create(this, user);
}
/// <inheritdoc /> /// <inheritdoc />
internal override Task OnLogoutAsync() internal override Task OnLogoutAsync()
{ {


+ 1
- 6
src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs View File

@@ -65,7 +65,7 @@ namespace Discord.Rest
{ {
Content = args.Content, Content = args.Content,
Embed = args.Embed.IsSpecified ? args.Embed.Value.ToModel() : Optional.Create<API.Embed>(), Embed = args.Embed.IsSpecified ? args.Embed.Value.ToModel() : Optional.Create<API.Embed>(),
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() : Optional<API.ActionRowComponent[]>.Unspecified
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() : Optional<API.ActionRowComponent[]>.Unspecified,
Flags = args.Flags.IsSpecified ? args.Flags.Value : Optional.Create<MessageFlags?>(), Flags = args.Flags.IsSpecified ? args.Flags.Value : Optional.Create<MessageFlags?>(),
AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional.Create<API.AllowedMentions>(), AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional.Create<API.AllowedMentions>(),
}; };
@@ -128,11 +128,6 @@ namespace Discord.Rest
await client.ApiClient.AddReactionAsync(channelId, messageId, emote is Emote e ? $"{e.Name}:{e.Id}" : UrlEncode(emote.Name), options).ConfigureAwait(false); await client.ApiClient.AddReactionAsync(channelId, messageId, emote is Emote e ? $"{e.Name}:{e.Id}" : UrlEncode(emote.Name), options).ConfigureAwait(false);
} }


public static async Task AddReactionAsync(ulong channelId, ulong messageId, IEmote emote, BaseDiscordClient client, RequestOptions options)
{
await client.ApiClient.AddReactionAsync(channelId, messageId, emote is Emote e ? $"{e.Name}:{e.Id}" : UrlEncode(emote.Name), options).ConfigureAwait(false);
}

public static async Task AddReactionAsync(IMessage msg, IEmote emote, BaseDiscordClient client, RequestOptions options) public static async Task AddReactionAsync(IMessage msg, IEmote emote, BaseDiscordClient client, RequestOptions options)
{ {
await client.ApiClient.AddReactionAsync(msg.Channel.Id, msg.Id, emote is Emote e ? $"{e.Name}:{e.Id}" : UrlEncode(emote.Name), options).ConfigureAwait(false); await client.ApiClient.AddReactionAsync(msg.Channel.Id, msg.Id, emote is Emote e ? $"{e.Name}:{e.Id}" : UrlEncode(emote.Name), options).ConfigureAwait(false);


+ 287
- 138
src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml View File

@@ -83,61 +83,6 @@
<member name="M:Discord.API.DiscordSocketApiClient.DisconnectInternalAsync(System.Exception)"> <member name="M:Discord.API.DiscordSocketApiClient.DisconnectInternalAsync(System.Exception)">
<exception cref="T:System.NotSupportedException">This client is not configured with WebSocket support.</exception> <exception cref="T:System.NotSupportedException">This client is not configured with WebSocket support.</exception>
</member> </member>
<member name="M:Discord.Audio.AudioClient.#ctor(Discord.WebSocket.SocketGuild,System.Int32,System.UInt64)">
<summary> Creates a new REST/WebSocket discord client. </summary>
</member>
<member name="M:Discord.Audio.AudioClient.Dispose">
<inheritdoc />
</member>
<member name="T:Discord.Audio.Streams.BufferedWriteStream">
<summary> Wraps another stream with a timed buffer. </summary>
</member>
<member name="T:Discord.Audio.Streams.InputStream">
<summary> Reads the payload from an RTP frame </summary>
</member>
<member name="T:Discord.Audio.Streams.OpusDecodeStream">
<summary> Converts Opus to PCM </summary>
</member>
<member name="M:Discord.Audio.Streams.OpusDecodeStream.WriteHeader(System.UInt16,System.UInt32,System.Boolean)">
<exception cref="T:System.InvalidOperationException">Header received with no payload.</exception>
</member>
<member name="M:Discord.Audio.Streams.OpusDecodeStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.InvalidOperationException">Received payload without an RTP header.</exception>
</member>
<member name="T:Discord.Audio.Streams.OpusEncodeStream">
<summary> Converts PCM to Opus </summary>
</member>
<member name="T:Discord.Audio.Streams.OutputStream">
<summary> Wraps an IAudioClient, sending voice data on write. </summary>
</member>
<member name="T:Discord.Audio.Streams.RTPReadStream">
<summary> Reads the payload from an RTP frame </summary>
</member>
<member name="M:Discord.Audio.Streams.RTPReadStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
<exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
</member>
<member name="T:Discord.Audio.Streams.RTPWriteStream">
<summary> Wraps data in an RTP frame </summary>
</member>
<member name="T:Discord.Audio.Streams.SodiumDecryptStream">
<summary>
Decrypts an RTP frame using libsodium.
</summary>
</member>
<member name="T:Discord.Audio.Streams.SodiumEncryptStream">
<summary>
Encrypts an RTP frame using libsodium.
</summary>
</member>
<member name="M:Discord.Audio.Streams.SodiumEncryptStream.WriteHeader(System.UInt16,System.UInt32,System.Boolean)">
<exception cref="T:System.InvalidOperationException">Header received with no payload.</exception>
</member>
<member name="M:Discord.Audio.Streams.SodiumEncryptStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.InvalidOperationException">Received payload without an RTP header.</exception>
<exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
<exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
</member>
<member name="T:Discord.WebSocket.BaseSocketClient"> <member name="T:Discord.WebSocket.BaseSocketClient">
<summary> <summary>
Represents the base of a WebSocket-based Discord client. Represents the base of a WebSocket-based Discord client.
@@ -202,14 +147,6 @@
A read-only collection of private channels that the user currently partakes in. A read-only collection of private channels that the user currently partakes in.
</returns> </returns>
</member> </member>
<member name="P:Discord.WebSocket.BaseSocketClient.VoiceRegions">
<summary>
Gets a collection of available voice regions.
</summary>
<returns>
A read-only collection of voice regions that the user has access to.
</returns>
</member>
<member name="M:Discord.WebSocket.BaseSocketClient.GetApplicationInfoAsync(Discord.RequestOptions)"> <member name="M:Discord.WebSocket.BaseSocketClient.GetApplicationInfoAsync(Discord.RequestOptions)">
<summary> <summary>
Gets a Discord application information for the logged-in user. Gets a Discord application information for the logged-in user.
@@ -291,14 +228,24 @@
found. found.
</returns> </returns>
</member> </member>
<member name="M:Discord.WebSocket.BaseSocketClient.GetVoiceRegion(System.String)">
<member name="M:Discord.WebSocket.BaseSocketClient.GetVoiceRegionsAsync(Discord.RequestOptions)">
<summary>
Gets all voice regions.
</summary>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that contains a read-only collection of REST-based voice regions.
</returns>
</member>
<member name="M:Discord.WebSocket.BaseSocketClient.GetVoiceRegionAsync(System.String,Discord.RequestOptions)">
<summary> <summary>
Gets a voice region. Gets a voice region.
</summary> </summary>
<param name="id">The identifier of the voice region (e.g. <c>eu-central</c> ).</param> <param name="id">The identifier of the voice region (e.g. <c>eu-central</c> ).</param>
<param name="options">The options to be used when sending the request.</param>
<returns> <returns>
A REST-based voice region associated with the identifier; <c>null</c> if the voice region is not
found.
A task that contains a REST-based voice region associated with the identifier; <c>null</c> if the
voice region is not found.
</returns> </returns>
</member> </member>
<member name="M:Discord.WebSocket.BaseSocketClient.StartAsync"> <member name="M:Discord.WebSocket.BaseSocketClient.StartAsync">
@@ -323,6 +270,12 @@
<param name="name">The name of the game.</param> <param name="name">The name of the game.</param>
<param name="streamUrl">If streaming, the URL of the stream. Must be a valid Twitch URL.</param> <param name="streamUrl">If streaming, the URL of the stream. Must be a valid Twitch URL.</param>
<param name="type">The type of the game.</param> <param name="type">The type of the game.</param>
<remarks>
<note type="warning">
Bot accounts cannot set <see cref="F:Discord.ActivityType.CustomStatus"/> as their activity
type and it will have no effect.
</note>
</remarks>
<returns> <returns>
A task that represents the asynchronous set operation. A task that represents the asynchronous set operation.
</returns> </returns>
@@ -336,6 +289,10 @@
<note type="note"> <note type="note">
Discord will only accept setting of name and the type of activity. Discord will only accept setting of name and the type of activity.
</note> </note>
<note type="warning">
Bot accounts cannot set <see cref="F:Discord.ActivityType.CustomStatus"/> as their activity
type and it will have no effect.
</note>
<note type="warning"> <note type="warning">
Rich Presence cannot be set via this method or client. Rich Presence is strictly limited to RPC Rich Presence cannot be set via this method or client. Rich Presence is strictly limited to RPC
clients only. clients only.
@@ -814,9 +771,6 @@
<member name="P:Discord.WebSocket.DiscordShardedClient.PrivateChannels"> <member name="P:Discord.WebSocket.DiscordShardedClient.PrivateChannels">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.DiscordShardedClient.VoiceRegions">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.DiscordShardedClient.Rest"> <member name="P:Discord.WebSocket.DiscordShardedClient.Rest">
<summary> <summary>
Provides access to a REST-only client with a shared state from this client. Provides access to a REST-only client with a shared state from this client.
@@ -855,7 +809,10 @@
<member name="M:Discord.WebSocket.DiscordShardedClient.GetUser(System.String,System.String)"> <member name="M:Discord.WebSocket.DiscordShardedClient.GetUser(System.String,System.String)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.DiscordShardedClient.GetVoiceRegion(System.String)">
<member name="M:Discord.WebSocket.DiscordShardedClient.GetVoiceRegionsAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordShardedClient.GetVoiceRegionAsync(System.String,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.DiscordShardedClient.DownloadUsersAsync(System.Collections.Generic.IEnumerable{Discord.IGuild})"> <member name="M:Discord.WebSocket.DiscordShardedClient.DownloadUsersAsync(System.Collections.Generic.IEnumerable{Discord.IGuild})">
@@ -980,9 +937,6 @@
A collection of group channels that have been opened in this session. A collection of group channels that have been opened in this session.
</returns> </returns>
</member> </member>
<member name="P:Discord.WebSocket.DiscordSocketClient.VoiceRegions">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.#ctor"> <member name="M:Discord.WebSocket.DiscordSocketClient.#ctor">
<summary> <summary>
Initializes a new REST/WebSocket-based Discord client. Initializes a new REST/WebSocket-based Discord client.
@@ -997,9 +951,6 @@
<member name="M:Discord.WebSocket.DiscordSocketClient.Dispose(System.Boolean)"> <member name="M:Discord.WebSocket.DiscordSocketClient.Dispose(System.Boolean)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.DiscordSocketClient.OnLoginAsync(Discord.TokenType,System.String)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.OnLogoutAsync"> <member name="M:Discord.WebSocket.DiscordSocketClient.OnLogoutAsync">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -1018,6 +969,44 @@
<member name="M:Discord.WebSocket.DiscordSocketClient.GetChannel(System.UInt64)"> <member name="M:Discord.WebSocket.DiscordSocketClient.GetChannel(System.UInt64)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.DiscordSocketClient.GetChannelAsync(System.UInt64,Discord.RequestOptions)">
<summary>
Gets a generic channel from the cache or does a rest request if unavailable.
</summary>
<example>
<code language="cs" title="Example method">
var channel = await _client.GetChannelAsync(381889909113225237);
if (channel != null &amp;&amp; channel is IMessageChannel msgChannel)
{
await msgChannel.SendMessageAsync($"{msgChannel} is created at {msgChannel.CreatedAt}");
}
</code>
</example>
<param name="id">The snowflake identifier of the channel (e.g. `381889909113225237`).</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous get operation. The task result contains the channel associated
with the snowflake identifier; <c>null</c> when the channel cannot be found.
</returns>
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.GetUserAsync(System.UInt64,Discord.RequestOptions)">
<summary>
Gets a user from the cache or does a rest request if unavailable.
</summary>
<example>
<code language="cs" title="Example method">
var user = await _client.GetUserAsync(168693960628371456);
if (user != null)
Console.WriteLine($"{user} is created at {user.CreatedAt}.";
</code>
</example>
<param name="id">The snowflake identifier of the user (e.g. `168693960628371456`).</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
A task that represents the asynchronous get operation. The task result contains the user associated with
the snowflake identifier; <c>null</c> if the user is not found.
</returns>
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.PurgeChannelCache"> <member name="M:Discord.WebSocket.DiscordSocketClient.PurgeChannelCache">
<summary> <summary>
Clears all cached channels from the client. Clears all cached channels from the client.
@@ -1039,7 +1028,10 @@
Clears cached users from the client. Clears cached users from the client.
</summary> </summary>
</member> </member>
<member name="M:Discord.WebSocket.DiscordSocketClient.GetVoiceRegion(System.String)">
<member name="M:Discord.WebSocket.DiscordSocketClient.GetVoiceRegionsAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.GetVoiceRegionAsync(System.String,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.DiscordSocketClient.DownloadUsersAsync(System.Collections.Generic.IEnumerable{Discord.IGuild})"> <member name="M:Discord.WebSocket.DiscordSocketClient.DownloadUsersAsync(System.Collections.Generic.IEnumerable{Discord.IGuild})">
@@ -1273,28 +1265,6 @@
Setting this property to <c>null</c>disables this check. Setting this property to <c>null</c>disables this check.
</summary> </summary>
</member> </member>
<member name="P:Discord.WebSocket.DiscordSocketConfig.ExclusiveBulkDelete">
<summary>
Gets or sets the behavior for <see cref="E:Discord.WebSocket.BaseSocketClient.MessageDeleted"/> on bulk deletes.
</summary>
<remarks>
<para>
If <c>true</c>, the <see cref="E:Discord.WebSocket.BaseSocketClient.MessageDeleted"/> event will not be raised for bulk
deletes, and only the <see cref="E:Discord.WebSocket.BaseSocketClient.MessagesBulkDeleted"/> will be raised. If <c>false</c>
, both events will be raised.
</para>
<para>
If unset, both events will be raised, but a warning will be raised the first time a bulk delete event is
received.
</para>
</remarks>
</member>
<member name="P:Discord.WebSocket.DiscordSocketConfig.GuildSubscriptions">
<summary>
Gets or sets enabling dispatching of guild subscription events e.g. presence and typing events.
This is not used if <see cref="P:Discord.WebSocket.DiscordSocketConfig.GatewayIntents"/> are provided.
</summary>
</member>
<member name="P:Discord.WebSocket.DiscordSocketConfig.IdentifyMaxConcurrency"> <member name="P:Discord.WebSocket.DiscordSocketConfig.IdentifyMaxConcurrency">
<summary> <summary>
Gets or sets the maximum identify concurrency. Gets or sets the maximum identify concurrency.
@@ -1321,7 +1291,8 @@
</member> </member>
<member name="P:Discord.WebSocket.DiscordSocketConfig.GatewayIntents"> <member name="P:Discord.WebSocket.DiscordSocketConfig.GatewayIntents">
<summary> <summary>
Gets or sets gateway intents to limit what events are sent from Discord. Allows for more granular control than the <see cref="P:Discord.WebSocket.DiscordSocketConfig.GuildSubscriptions"/> property.
Gets or sets gateway intents to limit what events are sent from Discord.
The default is <see cref="F:Discord.GatewayIntents.AllUnprivileged"/>.
</summary> </summary>
<remarks> <remarks>
For more information, please see For more information, please see
@@ -1720,6 +1691,9 @@
<member name="M:Discord.WebSocket.SocketDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketDMChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketDMChannel.TriggerTypingAsync(Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketDMChannel.TriggerTypingAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -1897,6 +1871,9 @@
<member name="M:Discord.WebSocket.SocketGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGroupChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGroupChannel.TriggerTypingAsync(Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGroupChannel.TriggerTypingAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2263,6 +2240,9 @@
<member name="M:Discord.WebSocket.SocketTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketTextChannel.ModifyMessageAsync(System.UInt64,System.Action{Discord.MessageProperties},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketTextChannel.DeleteMessageAsync(System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketTextChannel.DeleteMessageAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2433,9 +2413,6 @@
<member name="P:Discord.WebSocket.SocketGuild.AFKTimeout"> <member name="P:Discord.WebSocket.SocketGuild.AFKTimeout">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketGuild.IsEmbeddable">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuild.IsWidgetEnabled"> <member name="P:Discord.WebSocket.SocketGuild.IsWidgetEnabled">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -2588,14 +2565,6 @@
A <see cref="T:System.Int32"/> representing the maximum bitrate value allowed by Discord in this guild. A <see cref="T:System.Int32"/> representing the maximum bitrate value allowed by Discord in this guild.
</returns> </returns>
</member> </member>
<member name="P:Discord.WebSocket.SocketGuild.EmbedChannel">
<summary>
Gets the embed channel (i.e. the channel set in the guild's widget settings) in this guild.
</summary>
<returns>
A channel set within the server's widget settings; <see langword="null"/> if none is set.
</returns>
</member>
<member name="P:Discord.WebSocket.SocketGuild.WidgetChannel"> <member name="P:Discord.WebSocket.SocketGuild.WidgetChannel">
<summary> <summary>
Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild. Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.
@@ -2719,10 +2688,6 @@
<inheritdoc /> <inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</member> </member>
<member name="M:Discord.WebSocket.SocketGuild.ModifyEmbedAsync(System.Action{Discord.GuildEmbedProperties},Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</member>
<member name="M:Discord.WebSocket.SocketGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuild.ModifyWidgetAsync(System.Action{Discord.GuildWidgetProperties},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception> <exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
@@ -3026,6 +2991,9 @@
of application commands found within the guild. of application commands found within the guild.
</returns> </returns>
</member> </member>
<member name="M:Discord.WebSocket.SocketGuild.GetEmotesAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3056,12 +3024,6 @@
<member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#Available"> <member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#Available">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#DefaultChannelId">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#EmbedChannelId">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#WidgetChannelId"> <member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#WidgetChannelId">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3122,9 +3084,6 @@
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetEmbedChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetWidgetChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3491,6 +3450,98 @@
A task that represents the asynchronous operation of acknowledging the interaction. A task that represents the asynchronous operation of acknowledging the interaction.
</returns> </returns>
</member> </member>
<member name="P:Discord.WebSocket.ISocketInvite.Code">
<summary>
Gets the unique identifier for this invite.
</summary>
<returns>
A string containing the invite code (e.g. <c>FTqNnyS</c>).
</returns>
</member>
<member name="P:Discord.WebSocket.ISocketInvite.Url">
<summary>
Gets the URL used to accept this invite
</summary>
<returns>
A string containing the full invite URL (e.g. <c>https://discord.gg/FTqNnyS</c>).
</returns>
</member>
<member name="P:Discord.WebSocket.ISocketInvite.Channel">
<summary>
Gets the channel this invite is linked to.
</summary>
<returns>
A generic channel that the invite points to.
</returns>
</member>
<member name="P:Discord.WebSocket.ISocketInvite.Guild">
<summary>
Gets the guild this invite is linked to.
</summary>
<returns>
A guild object representing the guild that the invite points to.
</returns>
</member>
<member name="T:Discord.WebSocket.SocketGuildInvite">
<summary>
Represents a guild invite
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.Id">
<summary>
Gets the unique invite code
<returns>
Returns the unique invite code
</returns>
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.Inviter">
<summary>
Gets the user who created the invite
<returns>
Returns the user who created the invite
</returns>
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.MaxUses">
<summary>
Gets the maximum number of times the invite can be used, if there is no limit then the value will be 0
<returns>
Returns the maximum number of times the invite can be used, if there is no limit then the value will be 0
</returns>
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.Temporary">
<summary>
Gets whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
<returns>
Returns whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
</returns>
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.CreatedAt">
<summary>
Gets the time at which the invite was created
<returns>
Returns the time at which the invite was created
</returns>
</summary>
</member>
<member name="P:Discord.WebSocket.SocketGuildInvite.MaxAge">
<summary>
Gets how long the invite is valid for
<returns>
Returns how long the invite is valid for (in seconds)
</returns>
</summary>
</member>
<member name="M:Discord.WebSocket.SocketGuildInvite.DeleteAsync(Discord.RequestOptions)">
<summary>
Deletes the invite
</summary>
<param name="options"></param>
<returns></returns>
</member>
<member name="P:Discord.WebSocket.SocketInvite.ChannelId"> <member name="P:Discord.WebSocket.SocketInvite.ChannelId">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3522,9 +3573,6 @@
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#MemberCount"> <member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#MemberCount">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInviteMetadata#IsRevoked">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketInvite.IsTemporary"> <member name="P:Discord.WebSocket.SocketInvite.IsTemporary">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3598,7 +3646,10 @@
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#Channel"> <member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#Channel">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInviteMetadata#Inviter">
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#Inviter">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#TargetUser">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.MessageCache.GetMany(System.Nullable{System.UInt64},Discord.Direction,System.Int32)"> <member name="M:Discord.WebSocket.MessageCache.GetMany(System.Nullable{System.UInt64},Discord.Direction,System.Int32)">
@@ -3661,6 +3712,9 @@
<member name="P:Discord.WebSocket.SocketMessage.Components"> <member name="P:Discord.WebSocket.SocketMessage.Components">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="P:Discord.WebSocket.SocketMessage.Flags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketMessage.Attachments"> <member name="P:Discord.WebSocket.SocketMessage.Attachments">
<summary> <summary>
Returns all attachments included in this message. Returns all attachments included in this message.
@@ -3704,6 +3758,9 @@
<member name="P:Discord.WebSocket.SocketMessage.Tags"> <member name="P:Discord.WebSocket.SocketMessage.Tags">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketMessage.Reactions"> <member name="P:Discord.WebSocket.SocketMessage.Reactions">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3748,6 +3805,9 @@
<member name="P:Discord.WebSocket.SocketMessage.Discord#IMessage#Components"> <member name="P:Discord.WebSocket.SocketMessage.Discord#IMessage#Components">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="P:Discord.WebSocket.SocketMessage.Discord#IMessage#Stickers">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketMessage.AddReactionAsync(Discord.IEmote,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketMessage.AddReactionAsync(Discord.IEmote,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3885,6 +3945,9 @@
<member name="P:Discord.WebSocket.SocketUserMessage.MentionedUsers"> <member name="P:Discord.WebSocket.SocketUserMessage.MentionedUsers">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketUserMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUserMessage.ReferencedMessage"> <member name="P:Discord.WebSocket.SocketUserMessage.ReferencedMessage">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3899,9 +3962,6 @@
<member name="M:Discord.WebSocket.SocketUserMessage.UnpinAsync(Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketUserMessage.UnpinAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketUserMessage.ModifySuppressionAsync(System.Boolean,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketUserMessage.Resolve(Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling)"> <member name="M:Discord.WebSocket.SocketUserMessage.Resolve(Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling,Discord.TagHandling)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -3943,6 +4003,9 @@
<member name="P:Discord.WebSocket.SocketRole.Position"> <member name="P:Discord.WebSocket.SocketRole.Position">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketRole.Tags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketRole.CreatedAt"> <member name="P:Discord.WebSocket.SocketRole.CreatedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4082,6 +4145,9 @@
<member name="P:Discord.WebSocket.SocketGuildUser.IsStreaming"> <member name="P:Discord.WebSocket.SocketGuildUser.IsStreaming">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketGuildUser.IsPending">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuildUser.JoinedAt"> <member name="P:Discord.WebSocket.SocketGuildUser.JoinedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4125,15 +4191,27 @@
<member name="M:Discord.WebSocket.SocketGuildUser.KickAsync(System.String,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuildUser.KickAsync(System.String,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGuildUser.AddRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuildUser.AddRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuildUser.AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGuildUser.RemoveRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuildUser.RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketGuildUser.RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4160,9 +4238,6 @@
<member name="P:Discord.WebSocket.SocketPresence.Status"> <member name="P:Discord.WebSocket.SocketPresence.Status">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketPresence.Activity">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketPresence.ActiveClients"> <member name="P:Discord.WebSocket.SocketPresence.ActiveClients">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4296,6 +4371,9 @@
<member name="P:Discord.WebSocket.SocketUser.IsWebhook"> <member name="P:Discord.WebSocket.SocketUser.IsWebhook">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketUser.PublicFlags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.CreatedAt"> <member name="P:Discord.WebSocket.SocketUser.CreatedAt">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4305,9 +4383,6 @@
<member name="P:Discord.WebSocket.SocketUser.Mention"> <member name="P:Discord.WebSocket.SocketUser.Mention">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketUser.Activity">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.Status"> <member name="P:Discord.WebSocket.SocketUser.Status">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4325,7 +4400,7 @@
This property will only include guilds in the same <see cref="T:Discord.WebSocket.DiscordSocketClient"/>. This property will only include guilds in the same <see cref="T:Discord.WebSocket.DiscordSocketClient"/>.
</remarks> </remarks>
</member> </member>
<member name="M:Discord.WebSocket.SocketUser.GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.WebSocket.SocketUser.CreateDMChannelAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="M:Discord.WebSocket.SocketUser.GetAvatarUrl(Discord.ImageFormat,System.UInt16)"> <member name="M:Discord.WebSocket.SocketUser.GetAvatarUrl(Discord.ImageFormat,System.UInt16)">
@@ -4436,6 +4511,9 @@
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#PremiumSince"> <member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#PremiumSince">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#IsPending">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#GuildPermissions"> <member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#GuildPermissions">
<inheritdoc /> <inheritdoc />
</member> </member>
@@ -4450,18 +4528,34 @@
<inheritdoc /> <inheritdoc />
<exception cref="T:System.NotSupportedException">Webhook users cannot be modified.</exception> <exception cref="T:System.NotSupportedException">Webhook users cannot be modified.</exception>
</member> </member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception> <exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member> </member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#AddRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception> <exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member> </member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRoleAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRoleAsync(Discord.IRole,Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception> <exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member> </member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</member>
<member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#RemoveRolesAsync(System.Collections.Generic.IEnumerable{Discord.IRole},Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception> <exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
@@ -4531,6 +4625,61 @@
</summary> </summary>
<param name="message">The reason why the gateway has been requested to reconnect.</param> <param name="message">The reason why the gateway has been requested to reconnect.</param>
</member> </member>
<member name="M:Discord.Audio.AudioClient.#ctor(Discord.WebSocket.SocketGuild,System.Int32,System.UInt64)">
<summary> Creates a new REST/WebSocket discord client. </summary>
</member>
<member name="M:Discord.Audio.AudioClient.Dispose">
<inheritdoc />
</member>
<member name="T:Discord.Audio.Streams.BufferedWriteStream">
<summary> Wraps another stream with a timed buffer. </summary>
</member>
<member name="T:Discord.Audio.Streams.InputStream">
<summary> Reads the payload from an RTP frame </summary>
</member>
<member name="T:Discord.Audio.Streams.OpusDecodeStream">
<summary> Converts Opus to PCM </summary>
</member>
<member name="M:Discord.Audio.Streams.OpusDecodeStream.WriteHeader(System.UInt16,System.UInt32,System.Boolean)">
<exception cref="T:System.InvalidOperationException">Header received with no payload.</exception>
</member>
<member name="M:Discord.Audio.Streams.OpusDecodeStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.InvalidOperationException">Received payload without an RTP header.</exception>
</member>
<member name="T:Discord.Audio.Streams.OpusEncodeStream">
<summary> Converts PCM to Opus </summary>
</member>
<member name="T:Discord.Audio.Streams.OutputStream">
<summary> Wraps an IAudioClient, sending voice data on write. </summary>
</member>
<member name="T:Discord.Audio.Streams.RTPReadStream">
<summary> Reads the payload from an RTP frame </summary>
</member>
<member name="M:Discord.Audio.Streams.RTPReadStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
<exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
</member>
<member name="T:Discord.Audio.Streams.RTPWriteStream">
<summary> Wraps data in an RTP frame </summary>
</member>
<member name="T:Discord.Audio.Streams.SodiumDecryptStream">
<summary>
Decrypts an RTP frame using libsodium.
</summary>
</member>
<member name="T:Discord.Audio.Streams.SodiumEncryptStream">
<summary>
Encrypts an RTP frame using libsodium.
</summary>
</member>
<member name="M:Discord.Audio.Streams.SodiumEncryptStream.WriteHeader(System.UInt16,System.UInt32,System.Boolean)">
<exception cref="T:System.InvalidOperationException">Header received with no payload.</exception>
</member>
<member name="M:Discord.Audio.Streams.SodiumEncryptStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
<exception cref="T:System.InvalidOperationException">Received payload without an RTP header.</exception>
<exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
<exception cref="T:System.ObjectDisposedException">The associated <see cref="T:System.Threading.CancellationTokenSource" /> has been disposed.</exception>
</member>
<member name="T:Discord.Commands.ShardedCommandContext"> <member name="T:Discord.Commands.ShardedCommandContext">
<summary> The sharded variant of <see cref="T:Discord.Commands.ICommandContext"/>, which may contain the client, user, guild, channel, and message. </summary> <summary> The sharded variant of <see cref="T:Discord.Commands.ICommandContext"/>, which may contain the client, user, guild, channel, and message. </summary>
</member> </member>


+ 1
- 0
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -617,6 +617,7 @@ namespace Discord.WebSocket
var state = new ClientState(data.Guilds.Length, data.PrivateChannels.Length); var state = new ClientState(data.Guilds.Length, data.PrivateChannels.Length);


var currentUser = SocketSelfUser.Create(this, state, data.User); var currentUser = SocketSelfUser.Create(this, state, data.User);
Rest.CreateRestSelfUser(data.User);
var activities = _activity.IsSpecified ? ImmutableList.Create(_activity.Value) : null; var activities = _activity.IsSpecified ? ImmutableList.Create(_activity.Value) : null;
currentUser.Presence = new SocketPresence(Status, null, activities); currentUser.Presence = new SocketPresence(Status, null, activities);
ApiClient.CurrentUserId = currentUser.Id; ApiClient.CurrentUserId = currentUser.Id;


Loading…
Cancel
Save