Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RozmarinUS committed May 28, 2024
1 parent 4b1bb19 commit a1599ff
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/contributing/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
label: 'Contributing'
position: 99
collapsible: false
collapsible: true
collapsed: false
4 changes: 4 additions & 0 deletions docs/content/interceptors/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
label: 'Interceptors'
position: 7
collapsible: true
collapsed: true
33 changes: 33 additions & 0 deletions docs/content/interceptors/defer-interceptor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
id: defer-interceptor

title: Defer command

sidebar_position: 1
---

Interceptor added `interaction.deferReply()` to the beiginning of the code

## Usage

```typescript
import {
Context,
SlashCommand,
SlashCommandContext,
DeferCommandInterceptor,
} from '@globalart/nestcord';

@Injectable()
export class AppService {
@UseInterceptors(DeferCommandInterceptor)
@SlashCommand({
name: 'ping',
description: 'pong',
})
async execute(@Context() [interaction]: SlashCommandContext) {
setTimeout(() => interaction.followUp({ content: 'Pong!' }), 5000);
}
}

```
2 changes: 1 addition & 1 deletion docs/content/recipes/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
label: 'Recipes'
position: 7
position: 8
collapsible: true
collapsed: true

0 comments on commit a1599ff

Please sign in to comment.