Browse Source

Add DocFX refs to interaction framework docs

pull/1958/head
quin lynch 3 years ago
parent
commit
1f2afdc3e4
7 changed files with 47 additions and 2 deletions
  1. +5
    -0
      docs/guides/interactions_framework/autocompleters.md
  2. +5
    -0
      docs/guides/interactions_framework/dependency-injection.md
  3. +8
    -2
      docs/guides/interactions_framework/intro.md
  4. +5
    -0
      docs/guides/interactions_framework/post_execution.md
  5. +5
    -0
      docs/guides/interactions_framework/preconditions.md
  6. +5
    -0
      docs/guides/interactions_framework/typeconverters.md
  7. +14
    -0
      docs/guides/toc.yml

+ 5
- 0
docs/guides/interactions_framework/autocompleters.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.Autocompleters
title: 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.


docs/guides/interactions_framework/dependency_injection.md → docs/guides/interactions_framework/dependency-injection.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.DependencyInjection
title: 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.

+ 8
- 2
docs/guides/interactions_framework/intro.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.Intro
title: Introduction to the Interaction Framework
---

# Getting Started

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]` |
|[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



+ 5
- 0
docs/guides/interactions_framework/post_execution.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.PostEx
title: Post-Execution
---

# 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.


+ 5
- 0
docs/guides/interactions_framework/preconditions.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.Preconditions
title: 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)

+ 5
- 0
docs/guides/interactions_framework/typeconverters.md View File

@@ -1,3 +1,8 @@
---
uid: Guides.InteractionsFramework.TypeConverters
title: Type Converters
---

# TypeConverters

TypeConverters are responsible for registering command parameters to Discord and parsing the user inputs into method parameters.


+ 14
- 0
docs/guides/toc.yml View File

@@ -46,3 +46,17 @@
topicUid: Guides.MessageComponents.SelectMenus
- name: Advanced Concepts
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

Loading…
Cancel
Save