Skip to content

Commit 562ef1a

Browse files
authored
Merge pull request #581 from Syderr/patch-1
Add stopMiddlewares import to middleware.ts
2 parents f71363c + c20707f commit 562ef1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/website/docs/guide/02-commands/08-middlewares.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ the `beforeExecute` function.
7676
<Tabs>
7777
<TabItem value="ts" label="TypeScript" default>
7878
```ts title="src/app/commands/+middleware.ts"
79-
import type { MiddlewareContext } from 'commandkit';
79+
import { type MiddlewareContext, stopMiddlewares } from 'commandkit';
8080

8181
export function beforeExecute(ctx: MiddlewareContext) {
8282
if (ctx.interaction.user.id !== '1234567890') {
@@ -138,7 +138,7 @@ instance of the `CommandKitErrorCodes.StopMiddlewares` error.
138138
<Tabs>
139139
<TabItem value="ts" label="TypeScript" default>
140140
```ts title="src/app/commands/+middleware.ts"
141-
import type { MiddlewareContext } from 'commandkit';
141+
import { type MiddlewareContext, stopMiddlewares } from 'commandkit';
142142

143143
export function beforeExecute(ctx: MiddlewareContext) {
144144
try {

0 commit comments

Comments
 (0)