diff --git a/StyleAnalyzer.targets b/StyleAnalyzer.targets
index bbb90b800..2df86122a 100644
--- a/StyleAnalyzer.targets
+++ b/StyleAnalyzer.targets
@@ -1,9 +1,9 @@
-
+
diff --git a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
index 9d876a3bf..3a03e028b 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
@@ -11,13 +11,44 @@ namespace Discord
///
public enum ApplicationCommandOptionType : byte
{
+ ///
+ /// A sub command
+ ///
SubCommand = 1,
+
+ ///
+ /// A group of sub commands
+ ///
SubCommandGroup = 2,
+
+ ///
+ /// A of text
+ ///
String = 3,
+
+ ///
+ /// An
+ ///
Integer = 4,
+
+ ///
+ /// A
+ ///
Boolean = 5,
+
+ ///
+ /// A
+ ///
User = 6,
+
+ ///
+ /// A
+ ///
Channel = 7,
+
+ ///
+ /// A
+ ///
Role = 8
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
index 5b0c0ecf6..08406f844 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
@@ -6,6 +6,10 @@ using System.Threading.Tasks;
namespace Discord
{
+ ///
+ /// Provides properties that are used to modify a with the specified changes.
+ ///
+ ///
public class ApplicationCommandProperties
{
public string Name { get; set; }
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
index 903da5bd4..cd119cf4b 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
@@ -31,6 +31,16 @@ namespace Discord
///
string Description { get; }
+ ///
+ /// Modifies this command
+ ///
+ /// The delegate containing the properties to modify the command with.
+ /// The options to be used when sending the request.
+ ///
+ /// A task that represents the asynchronous modification operation.
+ ///
+ Task ModifyAsync(Action func, RequestOptions options = null);
+
IEnumerable? Options { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionData.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionData.cs
index 73d468fe0..c2b00ac4a 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionData.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionData.cs
@@ -6,10 +6,24 @@ using System.Threading.Tasks;
namespace Discord
{
+ ///
+ /// Represents data of an Interaction Command, see
+ ///
public interface IApplicationCommandInteractionData
{
+ ///
+ /// The snowflake id of this command
+ ///
ulong Id { get; }
+
+ ///
+ /// The name of this command
+ ///
string Name { get; }
- IEnumerable Options { get; }
+
+ ///
+ /// The params + values from the user
+ ///
+ IReadOnlyCollection Options { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionDataOption.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionDataOption.cs
index 7454e0c99..931c12f2a 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionDataOption.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandInteractionDataOption.cs
@@ -6,11 +6,25 @@ using System.Threading.Tasks;
namespace Discord
{
+ ///
+ /// Represents a option group for a command, see
+ ///
public interface IApplicationCommandInteractionDataOption
{
+ ///
+ /// The name of the parameter
+ ///
string Name { get; }
- ApplicationCommandOptionType Value { get; }
- IEnumerable Options { get; }
+
+ ///
+ /// The value of the pair
+ ///
+ ApplicationCommandOptionType? Value { get; }
+
+ ///
+ /// Present if this option is a group or subcommand
+ ///
+ IReadOnlyCollection Options { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
index 7e8e7668d..d7d81ab0d 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
namespace Discord
{
+ ///
+ /// Specifies choices for command group
+ ///
public interface IApplicationCommandOptionChoice
{
///
diff --git a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
index 02398a190..80b0e9153 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
@@ -16,12 +16,40 @@ namespace Discord
/// id of the interaction
///
ulong Id { get; }
+
+ ///
+ /// The type of this
+ ///
InteractionType Type { get; }
+
+ ///
+ /// The command data payload
+ ///
IApplicationCommandInteractionData? Data { get; }
+
+ ///
+ /// The guild it was sent from
+ ///
ulong GuildId { get; }
+
+ ///
+ /// The channel it was sent from
+ ///
ulong ChannelId { get; }
- IGuildUser Member { get; }
+
+ ///
+ /// Guild member id for the invoking user
+ ///
+ ulong MemberId { get; }
+
+ ///
+ /// A continuation token for responding to the interaction
+ ///
string Token { get; }
+
+ ///
+ /// read-only property, always 1
+ ///
int Version { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs b/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs
new file mode 100644
index 000000000..afb1ff13c
--- /dev/null
+++ b/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Discord
+{
+ ///
+ /// The response type for an
+ ///
+ public enum InteractionResponseType : byte
+ {
+ ///
+ /// ACK a Ping
+ ///
+ Pong = 1,
+
+ ///
+ /// ACK a command without sending a message, eating the user's input
+ ///
+ Acknowledge = 2,
+
+ ///
+ /// Respond with a message, eating the user's input
+ ///
+ ChannelMessage = 3,
+
+ ///
+ /// respond with a message, showing the user's input
+ ///
+ ChannelMessageWithSource = 4,
+
+ ///
+ /// ACK a command without sending a message, showing the user's input
+ ///
+ ACKWithSource = 5
+ }
+}
diff --git a/src/Discord.Net.Core/Entities/Interactions/InteractionType.cs b/src/Discord.Net.Core/Entities/Interactions/InteractionType.cs
index 19a5eb829..0b5f32f1f 100644
--- a/src/Discord.Net.Core/Entities/Interactions/InteractionType.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/InteractionType.cs
@@ -6,9 +6,19 @@ using System.Threading.Tasks;
namespace Discord
{
+ ///
+ /// Represents a type of Interaction from discord.
+ ///
public enum InteractionType : byte
{
+ ///
+ /// A ping from discord
+ ///
Ping = 1,
+
+ ///
+ /// An sent from discord
+ ///
ApplicationCommand = 2
}
}
diff --git a/src/Discord.Net.Rest/API/Common/InteractionApplicationCommandCallbackData.cs b/src/Discord.Net.Rest/API/Common/InteractionApplicationCommandCallbackData.cs
new file mode 100644
index 000000000..3d9434d94
--- /dev/null
+++ b/src/Discord.Net.Rest/API/Common/InteractionApplicationCommandCallbackData.cs
@@ -0,0 +1,24 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Discord.API
+{
+ internal class InteractionApplicationCommandCallbackData
+ {
+ [JsonProperty("tts")]
+ public Optional TTS { get; set; }
+
+ [JsonProperty("content")]
+ public string Content { get; set; }
+
+ [JsonProperty("embeds")]
+ public Optional