Skip to content

Commit 4474a31

Browse files
committed
fix broken link + codeblock titles
1 parent 7fc7c54 commit 4474a31

File tree

11 files changed

+33
-31
lines changed

11 files changed

+33
-31
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { Message } from 'discord.js';
2-
import { database } from '../../../database/store.ts';
31
import { revalidateTag } from '@commandkit/cache';
2+
import type { EventHandler } from 'commandkit';
3+
import { database } from '../../../database/store.ts';
44

5-
export default async function (message: Message) {
5+
const handler: EventHandler<'messageCreate'> = async (message) => {
66
if (message.author.bot || !message.inGuild()) return;
77

88
const key = `xp:${message.guildId}:${message.author.id}`;
@@ -13,4 +13,6 @@ export default async function (message: Message) {
1313

1414
database.set(key, newXp);
1515
await revalidateTag(key);
16-
}
16+
};
17+
18+
export default handler;

apps/website/docs/guide/04-jsx-components/01-using-jsx.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ builders:
3434
- [`TextDisplay`](./03-discord-components-v2/01-text-display.mdx)
3535
- [`Container`](./03-discord-components-v2/02-container.mdx)
3636
- [`MediaGallery`](./03-discord-components-v2/03-media-gallery.mdx)
37-
- [`Separator`](./03-discord-components-v2/04-section-separator.mdx)
37+
- [`Separator`](./03-discord-components-v2/04-separator.mdx)
3838
- [`File`](./03-discord-components-v2/05-file.mdx)
3939

4040
## Example usage

apps/website/docs/guide/04-jsx-components/02-discord-components-v1/01-action-row.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ components like buttons and select menus together in a single row.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/example.ts"
10+
```tsx title="src/app/commands/example.tsx"
1111
import type { ChatInputCommand } from 'commandkit';
1212
import { ActionRow, Button } from 'commandkit';
1313

@@ -30,7 +30,7 @@ export const chatInput: ChatInputCommand = async ({
3030

3131
## With select menus
3232

33-
```tsx title="src/app/commands/select-example.ts"
33+
```tsx title="src/app/commands/select-example.tsx"
3434
import type { ChatInputCommand } from 'commandkit';
3535
import {
3636
ActionRow,
@@ -62,7 +62,7 @@ export const chatInput: ChatInputCommand = async ({
6262
You can use multiple ActionRows in a single message to organize your
6363
components:
6464

65-
```tsx title="src/app/commands/multiple-rows.ts"
65+
```tsx title="src/app/commands/multiple-rows.tsx"
6666
import type { ChatInputCommand } from 'commandkit';
6767
import { ActionRow, Button } from 'commandkit';
6868

apps/website/docs/guide/04-jsx-components/02-discord-components-v1/02-button.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ emojis.
88

99
## Basic usage
1010

11-
```tsx title="src/app/commands/button-example.ts"
11+
```tsx title="src/app/commands/button-example.tsx"
1212
import type { ChatInputCommand } from 'commandkit';
1313
import { ActionRow, Button } from 'commandkit';
1414

@@ -32,7 +32,7 @@ export const chatInput: ChatInputCommand = async ({
3232

3333
Discord provides several built-in button styles:
3434

35-
```tsx title="src/app/commands/button-styles.ts"
35+
```tsx title="src/app/commands/button-styles.tsx"
3636
import type { ChatInputCommand } from 'commandkit';
3737
import { ActionRow, Button } from 'commandkit';
3838

@@ -59,7 +59,7 @@ export const chatInput: ChatInputCommand = async ({
5959

6060
Link buttons redirect users to external URLs:
6161

62-
```tsx title="src/app/commands/link-button.ts"
62+
```tsx title="src/app/commands/link-button.tsx"
6363
import type { ChatInputCommand } from 'commandkit';
6464
import { ActionRow, Button } from 'commandkit';
6565

@@ -85,7 +85,7 @@ export const chatInput: ChatInputCommand = async ({
8585

8686
Add emojis to make your buttons more visually appealing:
8787

88-
```tsx title="src/app/commands/emoji-button.ts"
88+
```tsx title="src/app/commands/emoji-button.tsx"
8989
import type { ChatInputCommand } from 'commandkit';
9090
import { ActionRow, Button } from 'commandkit';
9191

@@ -110,7 +110,7 @@ export const chatInput: ChatInputCommand = async ({
110110

111111
Disable buttons to prevent interaction:
112112

113-
```tsx title="src/app/commands/disabled-button.ts"
113+
```tsx title="src/app/commands/disabled-button.tsx"
114114
import type { ChatInputCommand } from 'commandkit';
115115
import { ActionRow, Button } from 'commandkit';
116116

@@ -135,7 +135,7 @@ export const chatInput: ChatInputCommand = async ({
135135

136136
Handle button interactions with the `onClick` prop:
137137

138-
```tsx title="src/app/commands/interactive-button.ts"
138+
```tsx title="src/app/commands/interactive-button.tsx"
139139
import type { ChatInputCommand, OnButtonKitClick } from 'commandkit';
140140
import { ActionRow, Button } from 'commandkit';
141141
import { MessageFlags } from 'discord.js';

apps/website/docs/guide/04-jsx-components/02-discord-components-v1/03-select-menu.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cases.
1010
The most common type of select menu that allows users to select from
1111
predefined string options:
1212

13-
```tsx title="src/app/commands/string-select.ts"
13+
```tsx title="src/app/commands/string-select.tsx"
1414
import type {
1515
ChatInputCommand,
1616
OnStringSelectMenuKitSubmit,
@@ -76,7 +76,7 @@ export const chatInput: ChatInputCommand = async ({
7676

7777
Allows users to select a channel from the server:
7878

79-
```tsx title="src/app/commands/channel-select.ts"
79+
```tsx title="src/app/commands/channel-select.tsx"
8080
import type {
8181
ChatInputCommand,
8282
OnChannelSelectMenuKitSubmit,
@@ -119,7 +119,7 @@ export const chatInput: ChatInputCommand = async ({
119119

120120
Allows users to select a role from the server:
121121

122-
```tsx title="src/app/commands/role-select.ts"
122+
```tsx title="src/app/commands/role-select.tsx"
123123
import type {
124124
ChatInputCommand,
125125
OnRoleSelectMenuKitSubmit,
@@ -162,7 +162,7 @@ export const chatInput: ChatInputCommand = async ({
162162

163163
Allows users to select a user from the server:
164164

165-
```tsx title="src/app/commands/user-select.ts"
165+
```tsx title="src/app/commands/user-select.tsx"
166166
import type {
167167
ChatInputCommand,
168168
OnUserSelectMenuKitSubmit,
@@ -205,7 +205,7 @@ export const chatInput: ChatInputCommand = async ({
205205

206206
Allows users to select a user or role from the server:
207207

208-
```tsx title="src/app/commands/mentionable-select.ts"
208+
```tsx title="src/app/commands/mentionable-select.tsx"
209209
import type {
210210
ChatInputCommand,
211211
OnMentionableSelectMenuKitSubmit,
@@ -249,7 +249,7 @@ export const chatInput: ChatInputCommand = async ({
249249
You can allow multiple selections by setting the `minValues` and
250250
`maxValues` properties:
251251

252-
```tsx title="src/app/commands/multi-select.ts"
252+
```tsx title="src/app/commands/multi-select.tsx"
253253
import type {
254254
ChatInputCommand,
255255
OnStringSelectMenuKitSubmit,

apps/website/docs/guide/04-jsx-components/02-discord-components-v1/04-modal.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ appear as popups in Discord.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/user-profile.ts"
10+
```tsx title="src/app/commands/user-profile.tsx"
1111
import type { ChatInputCommand, OnModalKitSubmit } from 'commandkit';
1212
import { Modal, ShortInput, ParagraphInput } from 'commandkit';
1313
import { MessageFlags } from 'discord.js';
@@ -57,7 +57,7 @@ export const chatInput: ChatInputCommand = async ({
5757

5858
For single-line text input:
5959

60-
```tsx title="src/app/commands/username.ts"
60+
```tsx title="src/app/commands/username.tsx"
6161
import type { ChatInputCommand, OnModalKitSubmit } from 'commandkit';
6262
import { Modal, ShortInput } from 'commandkit';
6363
import { MessageFlags } from 'discord.js';
@@ -100,7 +100,7 @@ export const chatInput: ChatInputCommand = async ({
100100

101101
For multi-line text input:
102102

103-
```tsx title="src/app/commands/feedback.ts"
103+
```tsx title="src/app/commands/feedback.tsx"
104104
import type { ChatInputCommand, OnModalKitSubmit } from 'commandkit';
105105
import { Modal, ParagraphInput } from 'commandkit';
106106
import { MessageFlags } from 'discord.js';

apps/website/docs/guide/04-jsx-components/03-discord-components-v2/01-text-display.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ you to show text content in your Discord messages.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/text-example.ts"
10+
```tsx title="src/app/commands/text-example.tsx"
1111
import type { ChatInputCommand } from 'commandkit';
1212
import { TextDisplay } from 'commandkit';
1313
import { MessageFlags } from 'discord.js';

apps/website/docs/guide/04-jsx-components/03-discord-components-v2/02-container.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ organize and style multiple components together.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/container-example.ts"
10+
```tsx title="src/app/commands/container-example.tsx"
1111
import type { ChatInputCommand } from 'commandkit';
1212
import { Container, TextDisplay } from 'commandkit';
1313
import { Colors, MessageFlags } from 'discord.js';
@@ -34,7 +34,7 @@ export const chatInput: ChatInputCommand = async ({
3434
The `Container` component accepts an `accentColor` prop that can be
3535
used to customize its appearance:
3636

37-
```tsx title="src/app/commands/styled-container.ts"
37+
```tsx title="src/app/commands/styled-container.tsx"
3838
import type { ChatInputCommand } from 'commandkit';
3939
import { Container, TextDisplay } from 'commandkit';
4040
import { Colors, MessageFlags } from 'discord.js';
@@ -68,7 +68,7 @@ export const chatInput: ChatInputCommand = async ({
6868

6969
You can nest various components inside a Container:
7070

71-
```tsx title="src/app/commands/nested-container.ts"
71+
```tsx title="src/app/commands/nested-container.tsx"
7272
import type { ChatInputCommand } from 'commandkit';
7373
import { Container, TextDisplay, Separator } from 'commandkit';
7474
import {
@@ -108,7 +108,7 @@ export const chatInput: ChatInputCommand = async ({
108108

109109
You can use multiple containers to organize different sections:
110110

111-
```tsx title="src/app/commands/multi-container.ts"
111+
```tsx title="src/app/commands/multi-container.tsx"
112112
import type { ChatInputCommand } from 'commandkit';
113113
import { Container, TextDisplay } from 'commandkit';
114114
import { Colors, MessageFlags } from 'discord.js';

apps/website/docs/guide/04-jsx-components/03-discord-components-v2/03-media-gallery.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ items in a grid layout.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/gallery-example.ts"
10+
```tsx title="src/app/commands/gallery-example.tsx"
1111
import type { ChatInputCommand } from 'commandkit';
1212
import {
1313
MediaGallery,

apps/website/docs/guide/04-jsx-components/03-discord-components-v2/04-separator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ your message components.
77

88
## Basic usage
99

10-
```tsx title="src/app/commands/separator-example.ts"
10+
```tsx title="src/app/commands/separator-example.tsx"
1111
import type { ChatInputCommand } from 'commandkit';
1212
import { Container, TextDisplay, Separator } from 'commandkit';
1313
import {

0 commit comments

Comments
 (0)