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.
</remarks>
</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">
<summary>
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.
</returns>
</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)">
<summary>
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">
<summary> Scan messages sent by all guild members. </summary>
</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">
<summary>
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.
</returns>
</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">
<summary>
Gets a value that indicates whether this guild has the widget enabled.
@@ -2628,31 +2603,6 @@
none is set.
</returns>
</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">
<summary>
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.
</returns>
</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)">
<summary>
Modifies this guild's widget.
@@ -3133,17 +3073,6 @@
channel in this guild; <see langword="null" /> if none is found.
</returns>
</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)">
<summary>
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.
</returns>
</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)">
<summary>
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>).
</returns>
</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">
<summary>
Gets the channel this invite is linked to.
@@ -4900,26 +4847,26 @@
invite points to; <c>null</c> if one cannot be obtained.
</returns>
</member>
<member name="T:Discord.IInviteMetadata">
<member name="P:Discord.IInvite.TargetUser">
<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>
<returns>
A user that is linked to this invite.
</returns>
</member>
<member name="P:Discord.IInviteMetadata.Inviter">
<member name="P:Discord.IInvite.TargetUserType">
<summary>
Gets the user that created this invite.
Gets the type of the linked <see cref="P:Discord.IInvite.TargetUser"/> for this invite.
</summary>
<returns>
A user that created this invite.
The type of the linked user that is linked to this invite.
</returns>
</member>
<member name="P:Discord.IInviteMetadata.IsRevoked">
<member name="T:Discord.IInviteMetadata">
<summary>
Gets a value that indicates whether the invite has been revoked.
Represents additional information regarding the generic invite object.
</summary>
<returns>
<c>true</c> if this invite was revoked; otherwise <c>false</c>.
</returns>
</member>
<member name="P:Discord.IInviteMetadata.IsTemporary">
<summary>
@@ -6211,10 +6158,10 @@
Gets all embeds included in this message.
</summary>
<remarks>
</remarks>
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
are generated; however, only one <see cref="F:Discord.EmbedType.Rich"/> <see cref="T:Discord.Embed"/> can be featured.
</remarks>
<returns>
A read-only collection of embed objects.
</returns>
@@ -6293,6 +6240,18 @@
The <see cref="T:Discord.IMessageComponent"/>'s attached to this message
</summary>
</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)">
<summary>
Adds a reaction to this message.
@@ -6410,6 +6369,75 @@
The <see cref="T:Discord.IEmote" /> used in the reaction.
</summary>
</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">
<summary>
Represents a generic message sent by the system.
@@ -6448,19 +6476,6 @@
A task that represents the asynchronous modification operation.
</returns>
</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)">
<summary>
Adds this message to its channel's pinned messages.
@@ -6556,6 +6571,39 @@
Gets the name of the application.
</summary>
</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">
<summary>
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.
</summary>
</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">
<summary>
Contains the IDs sent from a crossposted message or inline reply.
@@ -6720,9 +6782,6 @@
<summary>
The message is an inline reply.
</summary>
<remarks>
Only available in API v8.
</remarks>
</member>
<member name="F:Discord.MessageType.ApplicationCommand">
<summary>
@@ -6753,6 +6812,21 @@
<c>true</c> if the user has reacted to the message; otherwise <c>false</c>.
</returns>
</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">
<summary>
Specifies the handling type the tag should use.
@@ -6876,11 +6950,6 @@
Allows for the addition of reactions to messages.
</summary>
</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">
<summary>
Allows guild members to view a channel, which includes reading messages in text channels.
@@ -7007,9 +7076,6 @@
<member name="P:Discord.ChannelPermissions.AddReactions">
<summary> If <c>true</c>, a user may add reactions. </summary>
</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">
<summary> If <c>true</c>, a user may view channels. </summary>
</member>
@@ -7320,9 +7386,6 @@
<member name="P:Discord.GuildPermissions.ViewGuildInsights">
<summary> If <c>true</c>, a user may view the guild insights. </summary>
</member>
<member name="P:Discord.GuildPermissions.ReadMessages">
<summary> If True, a user may join channels. </summary>
</member>
<member name="P:Discord.GuildPermissions.ViewChannel">
<summary> If True, a user may view channels. </summary>
</member>
@@ -7392,6 +7455,9 @@
<member name="M:Discord.GuildPermissions.#ctor(System.UInt64)">
<summary> Creates a new <see cref="T:Discord.GuildPermissions"/> with the provided packed value. </summary>
</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)">
<summary> Creates a new <see cref="T:Discord.GuildPermissions"/> structure with the provided permissions. </summary>
</member>
@@ -7479,9 +7545,6 @@
<member name="P:Discord.OverwritePermissions.AddReactions">
<summary> If Allowed, a user may add reactions. </summary>
</member>
<member name="P:Discord.OverwritePermissions.ReadMessages">
<summary> If Allowed, a user may join channels. </summary>
</member>
<member name="P:Discord.OverwritePermissions.ViewChannel">
<summary> If Allowed, a user may join channels. </summary>
</member>
@@ -7542,6 +7605,9 @@
<member name="M:Discord.OverwritePermissions.#ctor(System.UInt64,System.UInt64)">
<summary> Creates a new OverwritePermissions with the provided allow and deny packed values. </summary>
</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)">
<summary>
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.
</returns>
</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)">
<summary>
Modifies this role.
@@ -7923,6 +7997,38 @@
This value may not be set if the role is an @everyone role.
</remarks>
</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">
<summary>
Represents a Discord Team.
@@ -8234,6 +8340,11 @@
this user possesses.
</returns>
</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)">
<summary>
Gets the level permissions granted to this user to a given channel.
@@ -8276,6 +8387,16 @@
A task that represents the asynchronous modification operation.
</returns>
</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)">
<summary>
Adds the specified role to this user in the guild.
@@ -8286,6 +8407,16 @@
A task that represents the asynchronous role addition operation.
</returns>
</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)">
<summary>
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.
</returns>
</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)">
<summary>
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.
</returns>
</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)">
<summary>
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.
</summary>
</member>
<member name="P:Discord.IPresence.Activity">
<summary>
Gets the activity this user is currently doing.
</summary>
</member>
<member name="P:Discord.IPresence.Status">
<summary>
Gets the current status of this user.
@@ -8484,9 +8630,20 @@
Gets the username for this user.
</summary>
</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>
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>
<remarks>
This method is used to obtain or create a channel used to send a direct message.
@@ -8501,7 +8658,7 @@
<example>
<para>The following example attempts to send a direct message to the target user and logs the incident should
it fail.</para>
<code region="GetOrCreateDMChannelAsync" language="cs"
<code region="CreateDMChannelAsync" language="cs"
source="../../../Discord.Net.Examples/Core/Entities/Users/IUser.Examples.cs"/>
</example>
<param name="options">The options to be used when sending the request.</param>
@@ -8629,17 +8786,22 @@
</member>
<member name="F:Discord.UserProperties.Staff">
<summary>
Flag given to Discord staff.
Flag given to users who are a Discord employee.
</summary>
</member>
<member name="F:Discord.UserProperties.Partner">
<summary>
Flag given to Discord partners.
Flag given to users who are owners of a partnered Discord server.
</summary>
</member>
<member name="F:Discord.UserProperties.BugHunter">
<member name="F:Discord.UserProperties.HypeSquadEvents">
<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>
</member>
<member name="F:Discord.UserProperties.HypeSquadBravery">
@@ -8662,6 +8824,36 @@
Flag given to users who subscribed to Nitro before games were added.
</summary>
</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">
<summary>
Defines the available Discord user status.
@@ -9199,6 +9391,17 @@
<member name="F:Discord.GatewayIntents.DirectMessageTyping">
<summary> This intent includes TYPING_START </summary>
</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">
<summary>
Represents a generic Discord client.
@@ -9838,22 +10041,6 @@
and an optional reason.
</summary>
</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">
<summary>
Represents options that should be used when sending a request.
@@ -10456,7 +10643,7 @@
</summary>
<param name="value">The snowflake identifier to resolve.</param>
<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>
</member>
<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.
</summary>
</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>
</member>
<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.InvalidOperationException">This operation may only be called with a <see cref="F:Discord.TokenType.Webhook"/> token.</exception>
</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)">
<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>
@@ -78,13 +85,6 @@
<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>
</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)">
<exception cref="T:System.ArgumentException"><paramref name="guildId"/> must not be equal to zero.</exception>
</member>
@@ -134,12 +134,6 @@
<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>
</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">
<summary>
Gets the login state of the client.
@@ -505,6 +499,14 @@
<c>null</c> if this is not mentioned in this entry.
</returns>
</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">
<summary>
Contains a piece of audit log data related to a channel update.
@@ -1174,10 +1176,10 @@
</member>
<member name="P:Discord.Rest.MessagePinAuditLogData.Target">
<summary>
Gets the user of the message that was pinned.
Gets the user of the message that was pinned if available.
</summary>
<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>
</member>
<member name="T:Discord.Rest.MessageUnpinAuditLogData">
@@ -1203,10 +1205,10 @@
</member>
<member name="P:Discord.Rest.MessageUnpinAuditLogData.Target">
<summary>
Gets the user of the message that was unpinned.
Gets the user of the message that was unpinned if available.
</summary>
<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>
</member>
<member name="T:Discord.Rest.OverwriteCreateAuditLogData">
@@ -1972,6 +1974,9 @@
<member name="M:Discord.Rest.RestDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -2063,6 +2068,9 @@
<member name="M:Discord.Rest.RestGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc />
</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)">
<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>
@@ -2356,6 +2364,9 @@
<member name="M:Discord.Rest.RestTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -2517,9 +2528,6 @@
<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>
</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)">
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
</member>
@@ -2576,9 +2584,6 @@
<member name="P:Discord.Rest.RestGuild.AFKTimeout">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.IsEmbeddable">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.IsWidgetEnabled">
<inheritdoc />
</member>
@@ -2597,9 +2602,6 @@
<member name="P:Discord.Rest.RestGuild.AFKChannelId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.EmbedChannelId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuild.WidgetChannelId">
<inheritdoc />
</member>
@@ -2724,10 +2726,6 @@
<inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</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)">
<inheritdoc />
<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.
</returns>
</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)">
<summary>
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.
</returns>
</member>
<member name="M:Discord.Rest.RestGuild.GetEmotesAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
@@ -3226,9 +3217,6 @@
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -3518,6 +3506,15 @@
<member name="P:Discord.Rest.RestInvite.GuildId">
<inheritdoc />
</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">
<inheritdoc />
</member>
@@ -3547,9 +3544,6 @@
<member name="T:Discord.Rest.RestInviteMetadata">
<summary> Represents additional information regarding the REST-based invite object. </summary>
</member>
<member name="P:Discord.Rest.RestInviteMetadata.IsRevoked">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInviteMetadata.IsTemporary">
<inheritdoc />
</member>
@@ -3562,17 +3556,9 @@
<member name="P:Discord.Rest.RestInviteMetadata.Uses">
<inheritdoc />
</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">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestInviteMetadata.Discord#IInviteMetadata#Inviter">
<inheritdoc />
</member>
<member name="F:Discord.Rest.MessageHelper.InlineCodeRegex">
<summary>
Regex used to check if some text is formatted as inline code.
@@ -3714,6 +3700,9 @@
<member name="P:Discord.Rest.RestMessage.Tags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Timestamp">
<inheritdoc />
</member>
@@ -3726,6 +3715,9 @@
<member name="P:Discord.Rest.RestMessage.Reference">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Flags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Components">
<inheritdoc/>
</member>
@@ -3758,6 +3750,9 @@
<member name="P:Discord.Rest.RestMessage.Discord#IMessage#Components">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestMessage.Discord#IMessage#Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestMessage.Reactions">
<inheritdoc />
</member>
@@ -3843,6 +3838,9 @@
<member name="P:Discord.Rest.RestUserMessage.Tags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUserMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUserMessage.ReferencedMessage">
<inheritdoc />
</member>
@@ -3855,9 +3853,6 @@
<member name="M:Discord.Rest.RestUserMessage.UnpinAsync(Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -3937,6 +3932,9 @@
<member name="P:Discord.Rest.RestRole.Position">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestRole.Tags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestRole.CreatedAt">
<inheritdoc />
</member>
@@ -4061,6 +4059,9 @@
<member name="P:Discord.Rest.RestGuildUser.GuildId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuildUser.IsPending">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestGuildUser.GuildPermissions">
<inheritdoc />
<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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -4168,6 +4181,9 @@
<member name="P:Discord.Rest.RestUser.AvatarId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUser.PublicFlags">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestUser.CreatedAt">
<inheritdoc />
</member>
@@ -4195,9 +4211,9 @@
<member name="M:Discord.Rest.RestUser.UpdateAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestUser.GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.Rest.RestUser.CreateDMChannelAsync(Discord.RequestOptions)">
<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>
<param name="options">The options to be used when sending the request.</param>
<returns>
@@ -4218,7 +4234,7 @@
A string that resolves to Username#Discriminator of the user.
</returns>
</member>
<member name="M:Discord.Rest.RestUser.Discord#IUser#GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.Rest.RestUser.Discord#IUser#CreateDMChannelAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhookUser.WebhookId">
@@ -4245,6 +4261,9 @@
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#Nickname">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#IsPending">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhookUser.Discord#IGuildUser#GuildPermissions">
<inheritdoc />
</member>
@@ -4257,15 +4276,27 @@
<member name="M:Discord.Rest.RestWebhookUser.Discord#IGuildUser#ModifyAsync(System.Action{Discord.GuildUserProperties},Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -4293,10 +4324,10 @@
<member name="P:Discord.Rest.RestWebhookUser.Discord#IVoiceState#IsStreaming">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhook.ChannelId">
<member name="P:Discord.Rest.RestWebhook.Token">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhook.Token">
<member name="P:Discord.Rest.RestWebhook.ChannelId">
<inheritdoc />
</member>
<member name="P:Discord.Rest.RestWebhook.Name">
@@ -4378,5 +4409,32 @@
A string containing the filename of this attachment.
</returns>
</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>
</doc>

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

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

internal void CreateRestSelfUser(API.User user)
{
base.CurrentUser = RestSelfUser.Create(this, user);
}
/// <inheritdoc />
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,
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?>(),
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);
}

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)
{
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)">
<exception cref="T:System.NotSupportedException">This client is not configured with WebSocket support.</exception>
</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">
<summary>
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.
</returns>
</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)">
<summary>
Gets a Discord application information for the logged-in user.
@@ -291,14 +228,24 @@
found.
</returns>
</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>
Gets a voice region.
</summary>
<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>
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>
</member>
<member name="M:Discord.WebSocket.BaseSocketClient.StartAsync">
@@ -323,6 +270,12 @@
<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="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>
A task that represents the asynchronous set operation.
</returns>
@@ -336,6 +289,10 @@
<note type="note">
Discord will only accept setting of name and the type of activity.
</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">
Rich Presence cannot be set via this method or client. Rich Presence is strictly limited to RPC
clients only.
@@ -814,9 +771,6 @@
<member name="P:Discord.WebSocket.DiscordShardedClient.PrivateChannels">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.DiscordShardedClient.VoiceRegions">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.DiscordShardedClient.Rest">
<summary>
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)">
<inheritdoc />
</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 />
</member>
<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.
</returns>
</member>
<member name="P:Discord.WebSocket.DiscordSocketClient.VoiceRegions">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.#ctor">
<summary>
Initializes a new REST/WebSocket-based Discord client.
@@ -997,9 +951,6 @@
<member name="M:Discord.WebSocket.DiscordSocketClient.Dispose(System.Boolean)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.OnLoginAsync(Discord.TokenType,System.String)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.DiscordSocketClient.OnLogoutAsync">
<inheritdoc />
</member>
@@ -1018,6 +969,44 @@
<member name="M:Discord.WebSocket.DiscordSocketClient.GetChannel(System.UInt64)">
<inheritdoc />
</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">
<summary>
Clears all cached channels from the client.
@@ -1039,7 +1028,10 @@
Clears cached users from the client.
</summary>
</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 />
</member>
<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.
</summary>
</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">
<summary>
Gets or sets the maximum identify concurrency.
@@ -1321,7 +1291,8 @@
</member>
<member name="P:Discord.WebSocket.DiscordSocketConfig.GatewayIntents">
<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>
<remarks>
For more information, please see
@@ -1720,6 +1691,9 @@
<member name="M:Discord.WebSocket.SocketDMChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -1897,6 +1871,9 @@
<member name="M:Discord.WebSocket.SocketGroupChannel.DeleteMessageAsync(Discord.IMessage,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -2263,6 +2240,9 @@
<member name="M:Discord.WebSocket.SocketTextChannel.DeleteMessagesAsync(System.Collections.Generic.IEnumerable{System.UInt64},Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -2433,9 +2413,6 @@
<member name="P:Discord.WebSocket.SocketGuild.AFKTimeout">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuild.IsEmbeddable">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuild.IsWidgetEnabled">
<inheritdoc />
</member>
@@ -2588,14 +2565,6 @@
A <see cref="T:System.Int32"/> representing the maximum bitrate value allowed by Discord in this guild.
</returns>
</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">
<summary>
Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.
@@ -2719,10 +2688,6 @@
<inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
</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)">
<inheritdoc />
<exception cref="T:System.ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
@@ -3026,6 +2991,9 @@
of application commands found within the guild.
</returns>
</member>
<member name="M:Discord.WebSocket.SocketGuild.GetEmotesAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketGuild.GetEmoteAsync(System.UInt64,Discord.RequestOptions)">
<inheritdoc />
</member>
@@ -3056,12 +3024,6 @@
<member name="P:Discord.WebSocket.SocketGuild.Discord#IGuild#Available">
<inheritdoc />
</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">
<inheritdoc />
</member>
@@ -3122,9 +3084,6 @@
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetDefaultChannelAsync(Discord.CacheMode,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -3491,6 +3450,98 @@
A task that represents the asynchronous operation of acknowledging the interaction.
</returns>
</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">
<inheritdoc />
</member>
@@ -3522,9 +3573,6 @@
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#MemberCount">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInviteMetadata#IsRevoked">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketInvite.IsTemporary">
<inheritdoc />
</member>
@@ -3598,7 +3646,10 @@
<member name="P:Discord.WebSocket.SocketInvite.Discord#IInvite#Channel">
<inheritdoc />
</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 />
</member>
<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">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketMessage.Flags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketMessage.Attachments">
<summary>
Returns all attachments included in this message.
@@ -3704,6 +3758,9 @@
<member name="P:Discord.WebSocket.SocketMessage.Tags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketMessage.Reactions">
<inheritdoc />
</member>
@@ -3748,6 +3805,9 @@
<member name="P:Discord.WebSocket.SocketMessage.Discord#IMessage#Components">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketMessage.Discord#IMessage#Stickers">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketMessage.AddReactionAsync(Discord.IEmote,Discord.RequestOptions)">
<inheritdoc />
</member>
@@ -3885,6 +3945,9 @@
<member name="P:Discord.WebSocket.SocketUserMessage.MentionedUsers">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUserMessage.Stickers">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUserMessage.ReferencedMessage">
<inheritdoc />
</member>
@@ -3899,9 +3962,6 @@
<member name="M:Discord.WebSocket.SocketUserMessage.UnpinAsync(Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -3943,6 +4003,9 @@
<member name="P:Discord.WebSocket.SocketRole.Position">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketRole.Tags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketRole.CreatedAt">
<inheritdoc />
</member>
@@ -4082,6 +4145,9 @@
<member name="P:Discord.WebSocket.SocketGuildUser.IsStreaming">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuildUser.IsPending">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketGuildUser.JoinedAt">
<inheritdoc />
</member>
@@ -4125,15 +4191,27 @@
<member name="M:Discord.WebSocket.SocketGuildUser.KickAsync(System.String,Discord.RequestOptions)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</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)">
<inheritdoc />
</member>
@@ -4160,9 +4238,6 @@
<member name="P:Discord.WebSocket.SocketPresence.Status">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketPresence.Activity">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketPresence.ActiveClients">
<inheritdoc />
</member>
@@ -4296,6 +4371,9 @@
<member name="P:Discord.WebSocket.SocketUser.IsWebhook">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.PublicFlags">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.CreatedAt">
<inheritdoc />
</member>
@@ -4305,9 +4383,6 @@
<member name="P:Discord.WebSocket.SocketUser.Mention">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.Activity">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketUser.Status">
<inheritdoc />
</member>
@@ -4325,7 +4400,7 @@
This property will only include guilds in the same <see cref="T:Discord.WebSocket.DiscordSocketClient"/>.
</remarks>
</member>
<member name="M:Discord.WebSocket.SocketUser.GetOrCreateDMChannelAsync(Discord.RequestOptions)">
<member name="M:Discord.WebSocket.SocketUser.CreateDMChannelAsync(Discord.RequestOptions)">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketUser.GetAvatarUrl(Discord.ImageFormat,System.UInt16)">
@@ -4436,6 +4511,9 @@
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#PremiumSince">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#IsPending">
<inheritdoc />
</member>
<member name="P:Discord.WebSocket.SocketWebhookUser.Discord#IGuildUser#GuildPermissions">
<inheritdoc />
</member>
@@ -4450,18 +4528,34 @@
<inheritdoc />
<exception cref="T:System.NotSupportedException">Webhook users cannot be modified.</exception>
</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)">
<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{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)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
</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)">
<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{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)">
<inheritdoc />
<exception cref="T:System.NotSupportedException">Roles are not supported on webhook users.</exception>
@@ -4531,6 +4625,61 @@
</summary>
<param name="message">The reason why the gateway has been requested to reconnect.</param>
</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">
<summary> The sharded variant of <see cref="T:Discord.Commands.ICommandContext"/>, which may contain the client, user, guild, channel, and message. </summary>
</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 currentUser = SocketSelfUser.Create(this, state, data.User);
Rest.CreateRestSelfUser(data.User);
var activities = _activity.IsSpecified ? ImmutableList.Create(_activity.Value) : null;
currentUser.Presence = new SocketPresence(Status, null, activities);
ApiClient.CurrentUserId = currentUser.Id;


Loading…
Cancel
Save