Skip to content

Commit 6ce87cb

Browse files
committed
chore: prettier
1 parent 0722bd1 commit 6ce87cb

32 files changed

+465
-298
lines changed

apps/docs/content/docs/classes/ButtonKit.mdx

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

6-
76
## ButtonKit extends ButtonBuilder
87

9-
108
```typescript
11-
ButtonKit(data)
9+
ButtonKit(data);
1210
```
13-
| Parameter | Type | Optional |
14-
| ----------- | ----------- | ----------- |
15-
| data | Partial\<ButtonComponentData> \| Partial\<APIButtonComponent> ||
1611

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

1816
## Properties
17+
1918
### public data: any
19+
2020
The API data associated with this component.
2121

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

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

3539
const row = new ActionRowBuilder().addComponents(button);
3640

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

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

4353
// Remove onClick handler and destroy the interaction collector
4454
button.onClick(null);
4555
```
4656

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 |
51-
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 |
5261

5362
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L74)
63+
5464
### public onEnd(handler): this
55-
| Parameter | Type | Optional |
56-
| ----------- | ----------- | ----------- |
57-
| handler | CommandKitButtonBuilderOnEnd ||
5865

66+
| Parameter | Type | Optional |
67+
| --------- | ---------------------------- | -------- |
68+
| handler | CommandKitButtonBuilderOnEnd ||
5969

6070
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/components/ButtonKit.ts#L98)
71+
6172
### public setCustomId(customId): this
62-
Sets the custom id for this button.
6373

74+
Sets the custom id for this button.
6475

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 |
6579

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 |
6980
### public setDisabled(disabled?): this
70-
Sets whether this button is disabled.
7181

82+
Sets whether this button is disabled.
7283

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 |
7387

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 |
7788
### public setEmoji(emoji): this
78-
Sets the emoji to display on this button.
7989

90+
Sets the emoji to display on this button.
8091

92+
| Parameter | Type | Optional | Description |
93+
| --------- | ------------------------ | -------- | ---------------- |
94+
| emoji | ComponentEmojiResolvable || The emoji to use |
8195

82-
| Parameter | Type | Optional | Description |
83-
| ----------- | ----------- | ----------- | ----------- |
84-
| emoji | ComponentEmojiResolvable || The emoji to use |
8596
### public setLabel(label): this
86-
Sets the label for this button.
8797

98+
Sets the label for this button.
8899

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 |
89103

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 |
93104
### public setSKUId(skuId): this
94-
Sets the SKU id that represents a purchasable SKU for this button.
95105

106+
Sets the SKU id that represents a purchasable SKU for this button.
96107

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 |
97111

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 |
101112
### public setStyle(style): this
102-
Sets the style of this button.
103113

114+
Sets the style of this button.
104115

116+
| Parameter | Type | Optional | Description |
117+
| --------- | ----------- | -------- | ---------------- |
118+
| style | ButtonStyle || The style to use |
105119

106-
| Parameter | Type | Optional | Description |
107-
| ----------- | ----------- | ----------- | ----------- |
108-
| style | ButtonStyle || The style to use |
109120
### public setURL(url): this
110-
Sets the URL for this button.
111121

122+
Sets the URL for this button.
112123

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 |
113127

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 |
117128
### public toJSON(): APIButtonComponent
129+
118130
ComponentBuilder.toJSON
131+
119132
### public static from(other): ButtonBuilder
120-
| Parameter | Type | Optional |
121-
| ----------- | ----------- | ----------- |
122-
| other | APIButtonComponent | JSONEncodable\<APIButtonComponent> ||
133+
134+
| Parameter | Type | Optional |
135+
| --------- | ------------------ | ---------------------------------- | --- |
136+
| other | APIButtonComponent | JSONEncodable\<APIButtonComponent> ||

apps/docs/content/docs/classes/CommandKit.mdx

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

6-
76
## CommandKit
87

9-
108
```typescript
11-
CommandKit(options)
9+
CommandKit(options);
1210
```
13-
| Parameter | Type | Optional | Description |
14-
| ----------- | ----------- | ----------- | ----------- |
15-
| options | CommandKitOptions || The default CommandKit configuration. |
1611

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

1816
## Properties
19-
### public static _instance: any
17+
18+
### public static \_instance: any
19+
2020
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L8)
21+
2122
### public client: any
23+
2224
Get the client attached to this CommandKit instance.
2325

2426
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L38)
27+
2528
### public commandHandler: any
29+
2630
Get command handler instance.
2731

2832
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L45)
33+
2934
### public commands: any
35+
3036
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L125)
37+
3138
### public commandsPath: any
39+
3240
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L141)
41+
3342
### public devGuildIds: any
43+
3444
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L169)
45+
3546
### public devRoleIds: any
47+
3648
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L176)
49+
3750
### public devUserIds: any
51+
3852
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L162)
53+
3954
### public eventsPath: any
55+
4056
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L148)
57+
4158
### public validationsPath: any
59+
4260
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L155)
4361

4462
## Methods
45-
### 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)>
46-
Updates application commands with the latest from "commandsPath".
47-
4863

64+
### 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)>
4965

50-
| Parameter | Type | Optional |
51-
| ----------- | ----------- | ----------- |
52-
| type | ReloadOptions ||
66+
Updates application commands with the latest from "commandsPath".
5367

68+
| Parameter | Type | Optional |
69+
| --------- | ------------- | -------- |
70+
| type | ReloadOptions ||
5471

5572
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L101)
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)>
57-
Updates application events with the latest from "eventsPath".
5873

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)>
5975

76+
Updates application events with the latest from "eventsPath".
6077

6178
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L109)
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)>
63-
Updates application command validations with the latest from "validationsPath".
6479

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)>
6581

82+
Updates application command validations with the latest from "validationsPath".
6683

67-
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L117)
84+
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/CommandKit.ts#L117)

apps/docs/content/docs/classes/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ description: Classes provided by CommandKit
77

88
<Cards><Card title="ButtonKit" description="No description available." href="/docs/classes/ButtonKit" />
99

10-
<Card title="CommandKit" description="No description available." href="/docs/classes/CommandKit" /></Cards>
10+
<Card title="CommandKit" description="No description available." href="/docs/classes/CommandKit" /></Cards>

apps/docs/content/docs/enums/ReloadType.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ 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-
14-
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L284)
13+
- [Source](https://github.com/underctrl-io/commandkit/blob/fe9b9d88f8541b4758cc813e8505d26748e6e5bd/packages/commandkit/src/types.ts#L284)

apps/docs/content/docs/enums/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,10 @@ description: Enums provided by CommandKit
55

66
# Enums
77

8-
<Cards><Card title="ReloadType" description="No description available." href="/docs/enums/ReloadType" /></Cards>
8+
<Cards>
9+
<Card
10+
title="ReloadType"
11+
description="No description available."
12+
href="/docs/enums/ReloadType"
13+
/>
14+
</Cards>

apps/docs/content/docs/functions/defineConfig.mdx

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

6-
76
### defineConfig(config): Partial\<[CommandKitConfig](/docs/types/CommandKitConfig)>
87

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

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

apps/docs/content/docs/functions/getConfig.mdx

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

6-
76
### getConfig(): [CommandKitConfig](/docs/types/CommandKitConfig)
87

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

apps/docs/content/docs/functions/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ description: Functions provided by CommandKit
77

88
<Cards><Card title="defineConfig" description="No description available." href="/docs/functions/defineConfig" />
99

10-
<Card title="getConfig" description="No description available." href="/docs/functions/getConfig" /></Cards>
10+
<Card title="getConfig" description="No description available." href="/docs/functions/getConfig" /></Cards>

0 commit comments

Comments
 (0)