@dressed/react 1.8.5-canary.1 → 1.8.5-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button.d.ts +4 -4
- package/dist/components/button.js +3 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.js +16 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/file-upload.d.ts +1 -1
- package/dist/components/file-upload.js +3 -3
- package/dist/components/file-upload.js.map +1 -1
- package/dist/components/radio-group.d.ts +4 -0
- package/dist/components/radio-group.js +11 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/select-menu.d.ts +3 -3
- package/dist/components/select-menu.js +7 -7
- package/dist/components/select-menu.js.map +1 -1
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/separator.js.map +1 -1
- package/dist/components/text-input.d.ts +1 -1
- package/dist/components/text-input.js +3 -3
- package/dist/components/text-input.js.map +1 -1
- package/dist/rendering/interaction.d.ts +1 -1
- package/dist/rendering/message.d.ts +2 -2
- package/dist/rendering/message.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ interface ButtonWithOnClick extends Omit<ButtonWithCustomId, "custom_id"> {
|
|
|
13
13
|
/** An additional handler identity defined in the callback setup which will run if the `onClick` is no longer registered */
|
|
14
14
|
fallback?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function Button(
|
|
17
|
-
export declare function Button(
|
|
18
|
-
export declare function Button(
|
|
19
|
-
export declare function Button(
|
|
16
|
+
export declare function Button(config: ButtonWithCustomId): ReactElement<APIButtonComponentWithCustomId>;
|
|
17
|
+
export declare function Button(config: ButtonWithOnClick): ReactElement<APIButtonComponentWithCustomId>;
|
|
18
|
+
export declare function Button(config: Omit<APIButtonComponentWithSKUId, "type" | "style">): ReactElement<APIButtonComponentWithSKUId>;
|
|
19
|
+
export declare function Button(config: Omit<APIButtonComponentWithURL, "type" | "style">): ReactElement<APIButtonComponentWithURL>;
|
|
20
20
|
export declare function parseButton<T extends APIButtonComponent & (Pick<ButtonWithOnClick, "onClick" | "fallback"> | object)>(nodeId: string, props: T): Promise<T>;
|
|
21
21
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Button as DressedComponent } from "dressed";
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { registerHandler } from "../rendering/callbacks.js";
|
|
4
|
-
export function Button(
|
|
5
|
-
const
|
|
6
|
-
return createElement("dressed-node",
|
|
4
|
+
export function Button(config) {
|
|
5
|
+
const props = DressedComponent(config);
|
|
6
|
+
return createElement("dressed-node", props);
|
|
7
7
|
}
|
|
8
8
|
export async function parseButton(nodeId, props) {
|
|
9
9
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA0B5D,MAAM,UAAU,MAAM,CACpB,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA0B5D,MAAM,UAAU,MAAM,CACpB,MAIqD;IAErD,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAe,CAAC,CAAC;IAChD,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAE/B,MAAc,EAAE,KAAQ;IACxB,OAAO;QACL,GAAG,KAAK;QACR,GAAG,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,OAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KACtG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { APICheckboxComponent, APICheckboxGroupComponent, APICheckboxGroupOption } from "discord-api-types/v10";
|
|
2
|
+
import { type ReactElement } from "react";
|
|
3
|
+
export declare function Checkbox(config: Omit<APICheckboxComponent, "type">): ReactElement<APICheckboxComponent>;
|
|
4
|
+
export declare function Checkbox(config: APICheckboxGroupOption): ReactElement<APICheckboxGroupOption>;
|
|
5
|
+
export declare function CheckboxGroup(config: Omit<APICheckboxGroupComponent, "type">): ReactElement<APICheckboxGroupComponent>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Checkbox as DressedComponent, CheckboxGroup as DressedGroupComponent } from "dressed";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
export function Checkbox(config) {
|
|
4
|
+
const props = "label" in config
|
|
5
|
+
? DressedComponent(config.label, config.value, {
|
|
6
|
+
default: config.default,
|
|
7
|
+
description: config.description,
|
|
8
|
+
})
|
|
9
|
+
: DressedComponent(config);
|
|
10
|
+
return createElement("dressed-node", props);
|
|
11
|
+
}
|
|
12
|
+
export function CheckboxGroup(config) {
|
|
13
|
+
const props = DressedGroupComponent(config);
|
|
14
|
+
return createElement("dressed-node", props);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAMzD,MAAM,UAAU,QAAQ,CACtB,MAAmE;IAEnE,MAAM,KAAK,GACT,OAAO,IAAI,MAAM;QACf,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;YAC3C,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAC;QACJ,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,aAAa,CAAC,cAAc,EAAE,KAAc,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,MAA+C;IAE/C,MAAM,KAAK,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { APIFileUploadComponent } from "discord-api-types/v10";
|
|
2
2
|
import { type ReactElement } from "react";
|
|
3
|
-
export declare function FileUpload(
|
|
3
|
+
export declare function FileUpload(config: Omit<APIFileUploadComponent, "type">): ReactElement<APIFileUploadComponent>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUpload as DressedComponent } from "dressed";
|
|
2
2
|
import { createElement } from "react";
|
|
3
|
-
export function FileUpload(
|
|
4
|
-
const
|
|
5
|
-
return createElement("dressed-node",
|
|
3
|
+
export function FileUpload(config) {
|
|
4
|
+
const props = DressedComponent(config);
|
|
5
|
+
return createElement("dressed-node", props);
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=file-upload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.js","sourceRoot":"","sources":["../../src/components/file-upload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAEzD,MAAM,UAAU,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"file-upload.js","sourceRoot":"","sources":["../../src/components/file-upload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAEzD,MAAM,UAAU,UAAU,CAAC,MAA4C;IACrE,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { APIRadioGroupComponent, APIRadioGroupOption } from "discord-api-types/v10";
|
|
2
|
+
import { type ReactElement } from "react";
|
|
3
|
+
export declare function RadioGroup(config: Omit<APIRadioGroupComponent, "type">): ReactElement<APIRadioGroupComponent>;
|
|
4
|
+
export declare function RadioGroupOption({ label, value, ...rest }: APIRadioGroupOption): ReactElement<APIRadioGroupOption>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RadioGroup as DressedComponent, RadioGroupOption as DressedOption } from "dressed";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
export function RadioGroup(config) {
|
|
4
|
+
const props = DressedComponent(config);
|
|
5
|
+
return createElement("dressed-node", props);
|
|
6
|
+
}
|
|
7
|
+
export function RadioGroupOption({ label, value, ...rest }) {
|
|
8
|
+
const props = DressedOption(label, value, rest);
|
|
9
|
+
return createElement("dressed-node", props);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,gBAAgB,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAEzD,MAAM,UAAU,UAAU,CAAC,MAA4C;IACrE,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAuB;IAC7E,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAChD,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -22,12 +22,12 @@ type SelectMenuWithOnClick<K extends SelectType> = Omit<SelectMenuWithCustomId<K
|
|
|
22
22
|
/** An additional handler identity defined in the callback setup which will run if the `onSubmit` is no longer registered */
|
|
23
23
|
fallback?: string;
|
|
24
24
|
};
|
|
25
|
-
export declare function SelectMenu<K extends SelectType>(
|
|
25
|
+
export declare function SelectMenu<K extends SelectType>(config: SelectMenuWithCustomId<K> & {
|
|
26
26
|
type: K;
|
|
27
27
|
}): ReactElement<SelectMap[`${K}Select`]>;
|
|
28
|
-
export declare function SelectMenu<K extends SelectType>(
|
|
28
|
+
export declare function SelectMenu<K extends SelectType>(config: SelectMenuWithOnClick<K> & {
|
|
29
29
|
type: K;
|
|
30
30
|
}): ReactElement<SelectMap[`${K}Select`]>;
|
|
31
|
-
export declare function SelectMenuOption(
|
|
31
|
+
export declare function SelectMenuOption({ label, value, ...rest }: APISelectMenuOption): ReactElement<APISelectMenuOption>;
|
|
32
32
|
export declare function parseSelectMenu<T extends APISelectMenuComponent & (Pick<SelectMenuWithOnClick<SelectType>, "onSubmit" | "fallback"> | object)>(nodeId: string, props: T, children: Node<APISelectMenuOption>[]): T;
|
|
33
33
|
export {};
|
|
@@ -2,14 +2,14 @@ import { ComponentType } from "discord-api-types/v10";
|
|
|
2
2
|
import { SelectMenu as DressedComponent, SelectMenuOption as DressedOption } from "dressed";
|
|
3
3
|
import { createElement } from "react";
|
|
4
4
|
import { registerHandler } from "../rendering/callbacks.js";
|
|
5
|
-
export function SelectMenu(
|
|
6
|
-
const { children, ...rest } =
|
|
7
|
-
const
|
|
8
|
-
return createElement("dressed-node",
|
|
5
|
+
export function SelectMenu(config) {
|
|
6
|
+
const { children, ...rest } = config;
|
|
7
|
+
const props = DressedComponent(rest);
|
|
8
|
+
return createElement("dressed-node", props, children);
|
|
9
9
|
}
|
|
10
|
-
export function SelectMenuOption(
|
|
11
|
-
const
|
|
12
|
-
return createElement("dressed-node",
|
|
10
|
+
export function SelectMenuOption({ label, value, ...rest }) {
|
|
11
|
+
const props = DressedOption(label, value, rest);
|
|
12
|
+
return createElement("dressed-node", props);
|
|
13
13
|
}
|
|
14
14
|
export function parseSelectMenu(nodeId, props, children) {
|
|
15
15
|
if (props.type === ComponentType.StringSelect) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-menu.js","sourceRoot":"","sources":["../../src/components/select-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,gBAAgB,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAqC,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA8B5D,MAAM,UAAU,UAAU,CACxB,
|
|
1
|
+
{"version":3,"file":"select-menu.js","sourceRoot":"","sources":["../../src/components/select-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,gBAAgB,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAqC,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA8B5D,MAAM,UAAU,UAAU,CACxB,MAA4D;IAE5D,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAiC,CAAC;IAChE,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAa,CAAC,CAAC;IAC9C,OAAO,aAAa,CAAC,cAAc,EAAE,KAAc,EAAE,QAAqB,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAuB;IAC7E,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAChD,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAE7B,MAAc,EAAE,KAAQ,EAAE,QAAqC;IAC/D,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,YAAY,EAAE,CAAC;QAC9C,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO;QACL,GAAG,KAAK;QACR,GAAG,CAAC,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,QAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KACxG,CAAC;AACJ,CAAC"}
|
|
@@ -3,5 +3,5 @@ import { type ReactElement } from "react";
|
|
|
3
3
|
interface SeparatorProps extends Omit<APISeparatorComponent, "type" | "spacing"> {
|
|
4
4
|
spacing?: keyof typeof SeparatorSpacingSize;
|
|
5
5
|
}
|
|
6
|
-
export declare function Separator(
|
|
6
|
+
export declare function Separator(config: SeparatorProps): ReactElement<APISeparatorComponent>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Separator as DressedComponent } from "dressed";
|
|
2
2
|
import { createElement } from "react";
|
|
3
|
-
export function Separator(
|
|
4
|
-
const
|
|
5
|
-
return createElement("dressed-node",
|
|
3
|
+
export function Separator(config) {
|
|
4
|
+
const props = DressedComponent(config);
|
|
5
|
+
return createElement("dressed-node", props);
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAMzD,MAAM,UAAU,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAMzD,MAAM,UAAU,SAAS,CAAC,MAAsB;IAC9C,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -3,5 +3,5 @@ import { type ReactElement } from "react";
|
|
|
3
3
|
interface TextInputProps extends Omit<APITextInputComponent, "type" | "style"> {
|
|
4
4
|
style?: keyof typeof TextInputStyle;
|
|
5
5
|
}
|
|
6
|
-
export declare function TextInput(
|
|
6
|
+
export declare function TextInput(config: TextInputProps): ReactElement<APITextInputComponent>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextInput as DressedComponent } from "dressed";
|
|
2
2
|
import { createElement } from "react";
|
|
3
|
-
export function TextInput(
|
|
4
|
-
const
|
|
5
|
-
return createElement("dressed-node",
|
|
3
|
+
export function TextInput(config) {
|
|
4
|
+
const props = DressedComponent(config);
|
|
5
|
+
return createElement("dressed-node", props);
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../src/components/text-input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAMzD,MAAM,UAAU,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../src/components/text-input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAMzD,MAAM,UAAU,SAAS,CAAC,MAAsB;IAC9C,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -7,7 +7,7 @@ type ReactivatedInteraction<T> = OverrideMethodParams<T, {
|
|
|
7
7
|
[K in "reply" | "editReply" | "update" | "followUp" | "showModal"]: [
|
|
8
8
|
components: ReactNode,
|
|
9
9
|
...(Parameters<T[K]> extends readonly [...infer P] ? [
|
|
10
|
-
data?: Omit<Exclude<P[0], string>, "content" | "components">,
|
|
10
|
+
data?: Omit<Exclude<P[0], string>, "content" | "components" | "embeds">,
|
|
11
11
|
$req?: P[1] & {
|
|
12
12
|
/**
|
|
13
13
|
* Do not set the contents of your response to `null` after 15 minutes (when Discord deletes the original interaction) in order to conserve resources.
|
|
@@ -17,9 +17,9 @@ export type WithContainer<T> = T & {
|
|
|
17
17
|
* Renders the provided children and posts a message to a guild text or DM channel with the `IsComponentsV2` flag.
|
|
18
18
|
* @example createMessage(channelId, <Button label="Foo" />)
|
|
19
19
|
*/
|
|
20
|
-
export declare function createMessage(channelId: Snowflake, components: ReactNode, data?: Omit<Exclude<Parameters<typeof dressedCreateMessage>[1], string>, "content" | "components">, $req?: CallConfig): Promise<WithContainer<APIMessage>>;
|
|
20
|
+
export declare function createMessage(channelId: Snowflake, components: ReactNode, data?: Omit<Exclude<Parameters<typeof dressedCreateMessage>[1], string>, "content" | "components" | "embeds">, $req?: CallConfig): Promise<WithContainer<APIMessage>>;
|
|
21
21
|
/**
|
|
22
22
|
* Renders the provided children and edits a previously sent message.
|
|
23
23
|
* @example editMessage(channelId, messageId, <Button label="Bar" />)
|
|
24
24
|
*/
|
|
25
|
-
export declare function editMessage(channelId: Snowflake, messageId: Snowflake, components: ReactNode, data?: Omit<Exclude<Parameters<typeof dressedEditMessage>[2], string>, "content" | "components">, $req?: CallConfig): Promise<WithContainer<APIMessage>>;
|
|
25
|
+
export declare function editMessage(channelId: Snowflake, messageId: Snowflake, components: ReactNode, data?: Omit<Exclude<Parameters<typeof dressedEditMessage>[2], string>, "content" | "components" | "embeds">, $req?: CallConfig): Promise<WithContainer<APIMessage>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/rendering/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAInG,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAapC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAoB,EACpB,UAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/rendering/message.ts"],"names":[],"mappings":"AAAA,O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