diff --git a/src/Discord.Net.Interactions/InteractionService.cs b/src/Discord.Net.Interactions/InteractionService.cs
index ac96f08ec..b394109a5 100644
--- a/src/Discord.Net.Interactions/InteractionService.cs
+++ b/src/Discord.Net.Interactions/InteractionService.cs
@@ -588,6 +588,60 @@ namespace Discord.Interactions
return true;
}
+ ///
+ /// Search the registered slash commands using a .
+ ///
+ /// Interaction entity to perform the search with.
+ ///
+ /// The search result. When successful, result contains the found .
+ ///
+ public SearchResult SearchSlashCommand(ISlashCommandInteraction slashCommandInteraction)
+ => _slashCommandMap.GetCommand(slashCommandInteraction.Data.GetCommandKeywords());
+
+ ///
+ /// Search the registered slash commands using a .
+ ///
+ /// Interaction entity to perform the search with.
+ ///
+ /// The search result. When successful, result contains the found .
+ ///
+ public SearchResult SearchComponentCommand(IComponentInteraction componentInteraction)
+ => _componentCommandMap.GetCommand(componentInteraction.Data.CustomId);
+
+ ///
+ /// Search the registered slash commands using a .
+ ///
+ /// Interaction entity to perform the search with.
+ ///
+ /// The search result. When successful, result contains the found .
+ ///
+ public SearchResult SearchUserCommand(IUserCommandInteraction userCommandInteraction)
+ => _contextCommandMaps[ApplicationCommandType.User].GetCommand(userCommandInteraction.Data.Name);
+
+ ///
+ /// Search the registered slash commands using a .
+ ///
+ /// Interaction entity to perform the search with.
+ ///
+ /// The search result. When successful, result contains the found .
+ ///
+ public SearchResult SearchMessageCommand(IMessageCommandInteraction messageCommandInteraction)
+ => _contextCommandMaps[ApplicationCommandType.Message].GetCommand(messageCommandInteraction.Data.Name);
+
+ ///
+ /// Search the registered slash commands using a .
+ ///
+ /// Interaction entity to perform the search with.
+ ///
+ /// The search result. When successful, result contains the found .
+ ///
+ public SearchResult SearchAutocompleteCommand(IAutocompleteInteraction autocompleteInteraction)
+ {
+ var keywords = autocompleteInteraction.Data.GetCommandKeywords();
+ keywords.Add(autocompleteInteraction.Data.Current.Name);
+ return _autocompleteCommandMap.GetCommand(keywords);
+ }
+
///
/// Execute a Command from a given .
///