@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.Autocompleters | |||||
title: Autocompleters | |||||
--- | |||||
# Autocompleters | # Autocompleters | ||||
Autocompleters provide a similar pattern to TypeConverters. Autocompleters are cached, singleton services and they are used by the Interaction Service to handle Autocomplete Interations targeted to a specific Slash Command parameter. | Autocompleters provide a similar pattern to TypeConverters. Autocompleters are cached, singleton services and they are used by the Interaction Service to handle Autocomplete Interations targeted to a specific Slash Command parameter. | ||||
@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.DependencyInjection | |||||
title: Dependency Injection | |||||
--- | |||||
# Dependency Injection | # Dependency Injection | ||||
Interaction Service uses dependency injection to perform most of its operations. This way, you can access service dependencies throughout the framework. | Interaction Service uses dependency injection to perform most of its operations. This way, you can access service dependencies throughout the framework. |
@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.Intro | |||||
title: Introduction to the Interaction Framework | |||||
--- | |||||
# Getting Started | # Getting Started | ||||
Interaction Service provides an attribute based framework for creating Discord Interaction handlers. | Interaction Service provides an attribute based framework for creating Discord Interaction handlers. | ||||
@@ -50,9 +55,10 @@ Valid **Interaction Commands** must comply with the following requirements: | |||||
|[Component Interaction Command](#component-interaction-commands)| `Task`/`Task<RuntimeResult>` | inf | `string` or `string[]` | `[ComponentInteraction]` | | |[Component Interaction Command](#component-interaction-commands)| `Task`/`Task<RuntimeResult>` | inf | `string` or `string[]` | `[ComponentInteraction]` | | ||||
|[Autocomplete Command](#autocomplete-commands)| `Task`/`Task<RuntimeResult>` | - | - | `[AutocompleteCommand]`| | |[Autocomplete Command](#autocomplete-commands)| `Task`/`Task<RuntimeResult>` | - | - | `[AutocompleteCommand]`| | ||||
**a `TypeConverter` that is capable of parsing type in question must be registered to the `InteractionService` instance.* | |||||
> [!NOTE] | |||||
> a `TypeConverter` that is capable of parsing type in question must be registered to the `InteractionService` instance. | |||||
> You should avoid using long running code in your command module. Depending on your setup, long running code may block the Gateway thread of your bot, interrupting its connection to Discord. | |||||
You should avoid using long running code in your command module. Depending on your setup, long running code may block the Gateway thread of your bot, interrupting its connection to Discord. | |||||
### Slash Commands | ### Slash Commands | ||||
@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.PostEx | |||||
title: Post-Execution | |||||
--- | |||||
# Post-Execution Logic | # Post-Execution Logic | ||||
Interaction Service uses `IResult`s to provide information about the state of command execution. These can be used to log internal exceptions or provide some insight to the command user. | Interaction Service uses `IResult`s to provide information about the state of command execution. These can be used to log internal exceptions or provide some insight to the command user. | ||||
@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.Preconditions | |||||
title: Preconditions | |||||
--- | |||||
# Preconditions | # Preconditions | ||||
Preconditions in Interaction Service work exactly the same as they do in ***Discord.Net.Commands***. For more information, check out [Preconditions](../commands/preconditions.md) | Preconditions in Interaction Service work exactly the same as they do in ***Discord.Net.Commands***. For more information, check out [Preconditions](../commands/preconditions.md) |
@@ -1,3 +1,8 @@ | |||||
--- | |||||
uid: Guides.InteractionsFramework.TypeConverters | |||||
title: Type Converters | |||||
--- | |||||
# TypeConverters | # TypeConverters | ||||
TypeConverters are responsible for registering command parameters to Discord and parsing the user inputs into method parameters. | TypeConverters are responsible for registering command parameters to Discord and parsing the user inputs into method parameters. | ||||
@@ -46,3 +46,17 @@ | |||||
topicUid: Guides.MessageComponents.SelectMenus | topicUid: Guides.MessageComponents.SelectMenus | ||||
- name: Advanced Concepts | - name: Advanced Concepts | ||||
topicUid: Guides.MessageComponents.Advanced | topicUid: Guides.MessageComponents.Advanced | ||||
- name: Interaction Framework | |||||
items: | |||||
- name: Getting started | |||||
topicUid: Guides.InteractionsFramework.Intro | |||||
- name: Dependency Injection | |||||
topicUid: Guides.InteractionsFramework.DependencyInjection | |||||
- name: Autocompleters | |||||
topicUid: Guides.InteractionsFramework.Autocompleters | |||||
- name: Preconditions | |||||
topicUid: Guides.InteractionsFramework.Preconditions | |||||
- name: Type Converters | |||||
topicUid: Guides.InteractionsFramework.TypeConverters | |||||
- name: Post Execution | |||||
topicUid: Guides.InteractionsFramework.PostEx |