@magicyan/discord 1.4.5 → 1.4.6
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.
|
@@ -62,6 +62,10 @@ function createContainer(data, ...components) {
|
|
|
62
62
|
if (isContainerData(data)) {
|
|
63
63
|
if (data.accentColor)
|
|
64
64
|
setColor(data.accentColor);
|
|
65
|
+
if (data.spoiler !== void 0)
|
|
66
|
+
container.setSpoiler(data.spoiler);
|
|
67
|
+
if (data.id !== void 0)
|
|
68
|
+
container.setId(data.id);
|
|
65
69
|
for (const component of data.components)
|
|
66
70
|
addComponent(component);
|
|
67
71
|
return container;
|
|
@@ -60,6 +60,10 @@ function createContainer(data, ...components) {
|
|
|
60
60
|
if (isContainerData(data)) {
|
|
61
61
|
if (data.accentColor)
|
|
62
62
|
setColor(data.accentColor);
|
|
63
|
+
if (data.spoiler !== void 0)
|
|
64
|
+
container.setSpoiler(data.spoiler);
|
|
65
|
+
if (data.id !== void 0)
|
|
66
|
+
container.setId(data.id);
|
|
63
67
|
for (const component of data.components)
|
|
64
68
|
addComponent(component);
|
|
65
69
|
return container;
|
package/dist/index.d.cts
CHANGED
|
@@ -406,7 +406,7 @@ declare function createSection(data: SectionData): SectionBuilder;
|
|
|
406
406
|
declare function createTextDisplay(content: string, id?: number): TextDisplayBuilder;
|
|
407
407
|
|
|
408
408
|
type ComponentData = TextDisplayBuilder | SeparatorBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder[] | MessageActionRowComponentBuilder | Attachment | AttachmentBuilder | string | null | undefined;
|
|
409
|
-
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (
|
|
409
|
+
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (SeparatorBuilder | TextDisplayBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | ContainerBuilder)[];
|
|
410
410
|
|
|
411
411
|
type ContainerColor = (string & {}) | ColorResolvable;
|
|
412
412
|
interface ContainerData extends Omit<ContainerComponentData, "accentColor" | "type" | "components"> {
|
package/dist/index.d.mts
CHANGED
|
@@ -406,7 +406,7 @@ declare function createSection(data: SectionData): SectionBuilder;
|
|
|
406
406
|
declare function createTextDisplay(content: string, id?: number): TextDisplayBuilder;
|
|
407
407
|
|
|
408
408
|
type ComponentData = TextDisplayBuilder | SeparatorBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder[] | MessageActionRowComponentBuilder | Attachment | AttachmentBuilder | string | null | undefined;
|
|
409
|
-
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (
|
|
409
|
+
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (SeparatorBuilder | TextDisplayBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | ContainerBuilder)[];
|
|
410
410
|
|
|
411
411
|
type ContainerColor = (string & {}) | ColorResolvable;
|
|
412
412
|
interface ContainerData extends Omit<ContainerComponentData, "accentColor" | "type" | "components"> {
|
package/dist/index.d.ts
CHANGED
|
@@ -406,7 +406,7 @@ declare function createSection(data: SectionData): SectionBuilder;
|
|
|
406
406
|
declare function createTextDisplay(content: string, id?: number): TextDisplayBuilder;
|
|
407
407
|
|
|
408
408
|
type ComponentData = TextDisplayBuilder | SeparatorBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder[] | MessageActionRowComponentBuilder | Attachment | AttachmentBuilder | string | null | undefined;
|
|
409
|
-
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (
|
|
409
|
+
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (SeparatorBuilder | TextDisplayBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | ContainerBuilder)[];
|
|
410
410
|
|
|
411
411
|
type ContainerColor = (string & {}) | ColorResolvable;
|
|
412
412
|
interface ContainerData extends Omit<ContainerComponentData, "accentColor" | "type" | "components"> {
|