Skip to content

Commit b44628b

Browse files
committed
fix(website): ignore mdx formatting for api-references
1 parent 6e189b1 commit b44628b

26 files changed

+225
-238
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22

33
**/docs/.next/
4+
**/website/docs/api-reference
45
.astro
56
dist
67
.commandkit

apps/website/docs/api-reference/classes/ButtonKit.mdx

Lines changed: 51 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,26 @@ title: ButtonKit
33
description: No description provided
44
---
55

6+
67
## ButtonKit extends ButtonBuilder
78

9+
810
```typescript
9-
new ButtonKit(data);
11+
new ButtonKit(data)
1012
```
13+
| Parameter | Type | Optional |
14+
| ----------- | ----------- | ----------- |
15+
| data | Partial\<ButtonComponentData> \| Partial\<APIButtonComponent> ||
1116

12-
| Parameter | Type | Optional |
13-
| --------- | ------------------------------------------------------------- | -------- |
14-
| data | Partial\<ButtonComponentData> \| Partial\<APIButtonComponent> ||
1517

1618
## Properties
17-
1819
### public data: any
19-
2020
The API data associated with this component.
2121

2222
## Methods
23-
2423
### public dispose(): ButtonKit
25-
26-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L165)
27-
24+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L165)
2825
### public onClick(handler, data?): this
29-
3026
Sets up an inline interaction collector for this button. This collector by default allows as many interactions as possible if it is actively used.
3127
If unused, this expires after 24 hours or custom time if specified.
3228

@@ -38,99 +34,89 @@ const button = new ButtonKit()
3834

3935
const row = new ActionRowBuilder().addComponents(button);
4036

41-
const message = await channel.send({
42-
content: 'Click the button',
43-
components: [row],
44-
});
37+
const message = await channel.send({ content: 'Click the button', components: [row] });
4538

46-
button.onClick(
47-
async (interaction) => {
48-
await interaction.reply('You clicked me!');
49-
},
50-
{ message },
51-
);
39+
button.onClick(async (interaction) => {
40+
await interaction.reply('You clicked me!');
41+
}, { message });
5242

5343
// Remove onClick handler and destroy the interaction collector
5444
button.onClick(null);
5545
```
5646

57-
| Parameter | Type | Optional | Description |
58-
| --------- | -------------------------------------------------------------- | -------- | ----------------------------------------------------- |
59-
| handler | CommandKitButtonBuilderInteractionCollectorDispatch | | The handler to run when the button is clicked |
60-
| data | CommandKitButtonBuilderInteractionCollectorDispatchContextData | | The context data to use for the interaction collector |
47+
| Parameter | Type | Optional | Description |
48+
| ----------- | ----------- | ----------- | ----------- |
49+
| handler | CommandKitButtonBuilderInteractionCollectorDispatch || The handler to run when the button is clicked |
50+
| data | CommandKitButtonBuilderInteractionCollectorDispatchContextData || The context data to use for the interaction collector |
6151

62-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L74)
6352

53+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L74)
6454
### public onEnd(handler): this
55+
| Parameter | Type | Optional |
56+
| ----------- | ----------- | ----------- |
57+
| handler | CommandKitButtonBuilderOnEnd ||
6558

66-
| Parameter | Type | Optional |
67-
| --------- | ---------------------------- | -------- |
68-
| handler | CommandKitButtonBuilderOnEnd ||
69-
70-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/components/ButtonKit.ts#L98)
7159

60+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/components/ButtonKit.ts#L98)
7261
### public setCustomId(customId): this
73-
7462
Sets the custom id for this button.
7563

76-
| Parameter | Type | Optional | Description |
77-
| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------------- |
78-
| customId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The custom id to use |
7964

80-
### public setDisabled(disabled?): this
8165

66+
| Parameter | Type | Optional | Description |
67+
| ----------- | ----------- | ----------- | ----------- |
68+
| customId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The custom id to use |
69+
### public setDisabled(disabled?): this
8270
Sets whether this button is disabled.
8371

84-
| Parameter | Type | Optional | Description |
85-
| --------- | --------------------------------------------------------------------------------------------------- | -------- | ------------------------------ |
86-
| disabled | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) || Whether to disable this button |
8772

88-
### public setEmoji(emoji): this
8973

74+
| Parameter | Type | Optional | Description |
75+
| ----------- | ----------- | ----------- | ----------- |
76+
| disabled | [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) || Whether to disable this button |
77+
### public setEmoji(emoji): this
9078
Sets the emoji to display on this button.
9179

92-
| Parameter | Type | Optional | Description |
93-
| --------- | ------------------------------------------------------------------------------------------------------------------- | -------- | ---------------- |
94-
| emoji | [ComponentEmojiResolvable](https://discord.js.org/docs/packages/discord.js/main/ComponentEmojiResolvable:TypeAlias) || The emoji to use |
9580

96-
### public setLabel(label): this
9781

82+
| Parameter | Type | Optional | Description |
83+
| ----------- | ----------- | ----------- | ----------- |
84+
| emoji | [ComponentEmojiResolvable](https://discord.js.org/docs/packages/discord.js/main/ComponentEmojiResolvable:TypeAlias) || The emoji to use |
85+
### public setLabel(label): this
9886
Sets the label for this button.
9987

100-
| Parameter | Type | Optional | Description |
101-
| --------- | ------------------------------------------------------------------------------------------------- | -------- | ---------------- |
102-
| label | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The label to use |
10388

104-
### public setSKUId(skuId): this
10589

90+
| Parameter | Type | Optional | Description |
91+
| ----------- | ----------- | ----------- | ----------- |
92+
| label | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The label to use |
93+
### public setSKUId(skuId): this
10694
Sets the SKU id that represents a purchasable SKU for this button.
10795

108-
| Parameter | Type | Optional | Description |
109-
| --------- | ------------------------------------------------------------------------------------------------- | -------- | ----------------- |
110-
| skuId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The SKU id to use |
11196

112-
### public setStyle(style): this
11397

98+
| Parameter | Type | Optional | Description |
99+
| ----------- | ----------- | ----------- | ----------- |
100+
| skuId | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The SKU id to use |
101+
### public setStyle(style): this
114102
Sets the style of this button.
115103

116-
| Parameter | Type | Optional | Description |
117-
| --------- | --------------------------------------------------------------------------------------- | -------- | ---------------- |
118-
| style | [ButtonStyle](https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle) || The style to use |
119104

120-
### public setURL(url): this
121105

106+
| Parameter | Type | Optional | Description |
107+
| ----------- | ----------- | ----------- | ----------- |
108+
| style | [ButtonStyle](https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle) || The style to use |
109+
### public setURL(url): this
122110
Sets the URL for this button.
123111

124-
| Parameter | Type | Optional | Description |
125-
| --------- | ------------------------------------------------------------------------------------------------- | -------- | -------------- |
126-
| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The URL to use |
127112

128-
### public toJSON(): [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)
129113

114+
| Parameter | Type | Optional | Description |
115+
| ----------- | ----------- | ----------- | ----------- |
116+
| url | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) || The URL to use |
117+
### public toJSON(): [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)
130118
ComponentBuilder.toJSON
131-
132119
### public static from(other): ButtonBuilder
133-
134-
| Parameter | Type | Optional |
135-
| --------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | --- |
136-
| other | [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) | JSONEncodable\<[APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)> ||
120+
| Parameter | Type | Optional |
121+
| ----------- | ----------- | ----------- |
122+
| other | [APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent) | JSONEncodable\<[APIButtonComponent](https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent)> ||

apps/website/docs/api-reference/classes/CommandKit.mdx

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,82 +3,65 @@ title: CommandKit
33
description: No description provided
44
---
55

6+
67
## CommandKit
78

9+
810
```typescript
9-
new CommandKit(options);
11+
new CommandKit(options)
1012
```
13+
| Parameter | Type | Optional | Description |
14+
| ----------- | ----------- | ----------- | ----------- |
15+
| options | CommandKitOptions || The default CommandKit configuration. |
1116

12-
| Parameter | Type | Optional | Description |
13-
| --------- | ----------------- | -------- | ------------------------------------- |
14-
| options | CommandKitOptions || The default CommandKit configuration. |
1517

1618
## Properties
17-
18-
### public static \_instance: any
19-
20-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L12)
21-
19+
### public static _instance: any
20+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L12)
2221
### public client: any
23-
2422
Get the client attached to this CommandKit instance.
2523

26-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L42)
27-
24+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L42)
2825
### public commandHandler: any
29-
3026
Get command handler instance.
3127

32-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L49)
33-
28+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L49)
3429
### public commands: any
35-
36-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L128)
37-
30+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L128)
3831
### public commandsPath: any
39-
40-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L144)
41-
32+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L144)
4233
### public devGuildIds: any
43-
44-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L172)
45-
34+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L172)
4635
### public devRoleIds: any
47-
48-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L179)
49-
36+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L179)
5037
### public devUserIds: any
51-
52-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L165)
53-
38+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L165)
5439
### public eventsPath: any
55-
56-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L151)
57-
40+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L151)
5841
### public validationsPath: any
59-
60-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L158)
42+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L158)
6143

6244
## Methods
63-
6445
### public reloadCommands(type?): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
65-
6646
Updates application commands with the latest from "commandsPath".
6747

68-
| Parameter | Type | Optional |
69-
| --------- | ------------- | -------- |
70-
| type | ReloadOptions ||
7148

72-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L104)
7349

74-
### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
50+
| Parameter | Type | Optional |
51+
| ----------- | ----------- | ----------- |
52+
| type | ReloadOptions ||
53+
7554

55+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L104)
56+
### public reloadEvents(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
7657
Updates application events with the latest from "eventsPath".
7758

78-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L112)
7959

80-
### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
8160

61+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L112)
62+
### public reloadValidations(): [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[void](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)>
8263
Updates application command validations with the latest from "validationsPath".
8364

84-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/CommandKit.ts#L120)
65+
66+
67+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/CommandKit.ts#L120)

apps/website/docs/api-reference/enums/ReloadType.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ description: No description provided
55

66
## ReloadType
77

8-
| Property | Type | Value | Description |
9-
| --------- | -------- | ----- | -------------------------------- |
10-
| Developer | 'dev' | N/A | Reload developer/guild commands. |
11-
| Global | 'global' | N/A | Reload global commands. |
8+
| Property | Type | Value | Description |
9+
| ----------- | ----------- | ----------- | ----------- |
10+
| Developer | 'dev' | N/A | Reload developer/guild commands. |
11+
| Global | 'global' | N/A | Reload global commands. |
1212

13-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/types.ts#L275)
13+
14+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/types.ts#L275)

apps/website/docs/api-reference/functions/defineConfig.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ title: defineConfig
33
description: No description provided
44
---
55

6+
67
### defineConfig(config): Partial\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)>
78

8-
| Parameter | Type | Optional |
9-
| --------- | ------------------------------------------------------------------------------ | -------- |
10-
| config | PartialConfig\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)> ||
9+
| Parameter | Type | Optional |
10+
| ----------- | ----------- | ----------- |
11+
| config | PartialConfig\<[CommandKitConfig](/docs/api-reference/types/CommandKitConfig)> ||
12+
1113

12-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/config.ts#L71)
14+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/config.ts#L71)

apps/website/docs/api-reference/functions/getConfig.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: getConfig
33
description: No description provided
44
---
55

6+
67
### getConfig(): [CommandKitConfig](/docs/api-reference/types/CommandKitConfig)
78

8-
- [Source](https://github.com/underctrl-io/commandkit/blob/d276a8377813631933aebfa66545130a52f7a7cb/packages/commandkit/src/config.ts#L60)
9+
- [Source](https://github.com/underctrl-io/commandkit/blob/6e189b13079ad78949d9ad2ddda0cbfd45677e1d/packages/commandkit/src/config.ts#L60)

0 commit comments

Comments
 (0)