Update interaction summaries (#2099)

* init

* Update RestMessageComponentData.cs

* Update src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
This commit is contained in:
Quin Lynch
2022-02-12 06:51:14 -04:00
committed by GitHub
parent 69da238a0f
commit 503d32aa7e
22 changed files with 51 additions and 99 deletions

View File

@@ -28,7 +28,7 @@ namespace Discord.Rest
=> Data.Id;
/// <summary>
/// The data associated with this interaction.
/// Gets the data associated with this interaction.
/// </summary>
internal new RestCommandBaseData Data { get; private set; }

View File

@@ -10,7 +10,7 @@ namespace Discord.Rest
public class RestMessageCommand : RestCommandBase, IMessageCommandInteraction, IDiscordInteraction
{
/// <summary>
/// The data associated with this interaction.
/// Gets the data associated with this interaction.
/// </summary>
public new RestMessageCommandData Data { get; private set; }

View File

@@ -20,7 +20,7 @@ namespace Discord.Rest
/// <inheritdoc/>
/// <remarks>
/// <b>Note</b> Not implemented for <see cref="SocketMessageCommandData"/>
/// <b>Note</b> Not implemented for <see cref="RestMessageCommandData"/>
/// </remarks>
public override IReadOnlyCollection<IApplicationCommandInteractionDataOption> Options
=> throw new System.NotImplementedException();

View File

@@ -18,7 +18,7 @@ namespace Discord.Rest
/// <inheritdoc/>
/// <remarks>
/// <b>Note</b> Not implemented for <see cref="SocketUserCommandData"/>
/// <b>Note</b> Not implemented for <see cref="RestUserCommandData"/>
/// </remarks>
public override IReadOnlyCollection<IApplicationCommandInteractionDataOption> Options
=> throw new System.NotImplementedException();

View File

@@ -12,19 +12,13 @@ namespace Discord.Rest
/// </summary>
public class RestMessageComponentData : IComponentInteractionData, IDiscordInteractionData
{
/// <summary>
/// Gets the components Custom Id that was clicked.
/// </summary>
/// <inheritdoc/>
public string CustomId { get; }
/// <summary>
/// Gets the type of the component clicked.
/// </summary>
/// <inheritdoc/>
public ComponentType Type { get; }
/// <summary>
/// Gets the value(s) of a <see cref="SelectMenuComponent"/> interaction response.
/// </summary>
/// <inheritdoc/>
public IReadOnlyCollection<string> Values { get; }
/// <inheritdoc/>

View File

@@ -28,7 +28,7 @@ namespace Discord.Rest
public bool IsDefaultPermission { get; private set; }
/// <summary>
/// The options of this command.
/// Gets a collection of options for this command.
/// </summary>
public IReadOnlyCollection<RestApplicationCommandOption> Options { get; private set; }

View File

@@ -36,18 +36,16 @@ namespace Discord.Rest
public double? MaxValue { get; private set; }
/// <summary>
/// A collection of <see cref="RestApplicationCommandChoice"/>'s for this command.
/// Gets a collection of <see cref="RestApplicationCommandChoice"/>s for this command.
/// </summary>
public IReadOnlyCollection<RestApplicationCommandChoice> Choices { get; private set; }
/// <summary>
/// A collection of <see cref="RestApplicationCommandOption"/>'s for this command.
/// Gets a collection of <see cref="RestApplicationCommandOption"/>s for this command.
/// </summary>
public IReadOnlyCollection<RestApplicationCommandOption> Options { get; private set; }
/// <summary>
/// The allowed channel types for this option.
/// </summary>
/// <inheritdoc/>
public IReadOnlyCollection<ChannelType> ChannelTypes { get; private set; }
internal RestApplicationCommandOption() { }

View File

@@ -10,7 +10,7 @@ namespace Discord.Rest
public class RestGuildCommand : RestApplicationCommand
{
/// <summary>
/// The guild Id where this command originates.
/// Gets the guild Id where this command originates.
/// </summary>
public ulong GuildId { get; private set; }

View File

@@ -43,7 +43,7 @@ namespace Discord.Rest
public DateTimeOffset CreatedAt { get; private set; }
/// <summary>
/// <see langword="true"/> if the token is valid for replying to, otherwise <see langword="false"/>.
/// Gets whether or not the token used to respond to this interaction is valid.
/// </summary>
public bool IsValidToken
=> InteractionHelper.CanRespondOrFollowup(this);

View File

@@ -13,34 +13,22 @@ namespace Discord.Rest
/// </summary>
public class RestAutocompleteInteractionData : IAutocompleteInteractionData
{
/// <summary>
/// Gets the name of the invoked command.
/// </summary>
/// <inheritdoc/>
public string CommandName { get; }
/// <summary>
/// Gets the id of the invoked command.
/// </summary>
/// <inheritdoc/>
public ulong CommandId { get; }
/// <summary>
/// Gets the type of the invoked command.
/// </summary>
/// <inheritdoc/>
public ApplicationCommandType Type { get; }
/// <summary>
/// Gets the version of the invoked command.
/// </summary>
/// <inheritdoc/>
public ulong Version { get; }
/// <summary>
/// Gets the current autocomplete option that is actively being filled out.
/// </summary>
/// <inheritdoc/>
public AutocompleteOption Current { get; }
/// <summary>
/// Gets a collection of all the other options the executing users has filled out.
/// </summary>
/// <inheritdoc/>
public IReadOnlyCollection<AutocompleteOption> Options { get; }
internal RestAutocompleteInteractionData(DataModel model)