seyfert 3.1.1-dev-14693940279.0 → 3.1.1-dev-14694263034.0

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.
@@ -1,4 +1,4 @@
1
- import { type APITextDispalyComponent } from '../types';
1
+ import { type APITextDisplayComponent } from '../types';
2
2
  import { BaseComponentBuilder } from './Base';
3
3
  /**
4
4
  * Represents a text display component builder.
@@ -8,12 +8,12 @@ import { BaseComponentBuilder } from './Base';
8
8
  * const text = new TextDisplay().content('Hello, world!');
9
9
  * ```
10
10
  */
11
- export declare class TextDisplay extends BaseComponentBuilder<APITextDispalyComponent> {
11
+ export declare class TextDisplay extends BaseComponentBuilder<APITextDisplayComponent> {
12
12
  /**
13
13
  * Constructs a new TextDisplay component.
14
14
  * @param data Optional initial data for the text display component.
15
15
  */
16
- constructor(data?: Partial<APITextDispalyComponent>);
16
+ constructor(data?: Partial<APITextDisplayComponent>);
17
17
  /**
18
18
  * Sets the ID for the text display component.
19
19
  * @param id The ID to set.
@@ -4,7 +4,7 @@ import type { APIEmbed, APIInteractionResponseCallbackData, APIInteractionRespon
4
4
  import type { OmitInsert } from './util';
5
5
  export interface ResolverProps {
6
6
  embeds?: Embed[] | APIEmbed[] | undefined;
7
- components?: TopLevelBuilders[] | TopLevelBuilders['toJSON'][];
7
+ components?: TopLevelBuilders[] | ReturnType<TopLevelBuilders['toJSON']>[];
8
8
  files?: AttachmentBuilder[] | Attachment[] | RawFile[] | undefined;
9
9
  }
10
10
  export interface SendResolverProps extends ResolverProps {
@@ -1,5 +1,5 @@
1
1
  import { type ActionRow, type Button, type ChannelSelectMenu, type Container, type File, type MediaGallery, type MentionableSelectMenu, type RoleSelectMenu, type Section, type Separator, type StringSelectMenu, type TextDisplay, type TextInput, type Thumbnail, type UserSelectMenu } from '../builders';
2
- import { type APIActionRowComponent, type APIActionRowComponentTypes, type APIButtonComponent, type APIChannelSelectComponent, type APIContainerComponent, type APIFileComponent, type APIMediaGalleryComponent, type APIMentionableSelectComponent, type APIRoleSelectComponent, type APISectionComponent, type APISeparatorComponent, type APIStringSelectComponent, type APITextDispalyComponent, type APITextInputComponent, type APIThumbnailComponent, type APIUserSelectComponent, ComponentType } from '../types';
2
+ import { type APIActionRowComponent, type APIActionRowComponentTypes, type APIButtonComponent, type APIChannelSelectComponent, type APIContainerComponent, type APIFileComponent, type APIMediaGalleryComponent, type APIMentionableSelectComponent, type APIRoleSelectComponent, type APISectionComponent, type APISeparatorComponent, type APIStringSelectComponent, type APITextDisplayComponent, type APITextInputComponent, type APIThumbnailComponent, type APIUserSelectComponent, ComponentType } from '../types';
3
3
  export declare class BaseComponent<T extends ComponentType> {
4
4
  data: APIComponentsMap[T];
5
5
  constructor(data: APIComponentsMap[T]);
@@ -22,7 +22,7 @@ export interface APIComponentsMap {
22
22
  [ComponentType.Container]: APIContainerComponent;
23
23
  [ComponentType.MediaGallery]: APIMediaGalleryComponent;
24
24
  [ComponentType.Separator]: APISeparatorComponent;
25
- [ComponentType.TextDisplay]: APITextDispalyComponent;
25
+ [ComponentType.TextDisplay]: APITextDisplayComponent;
26
26
  }
27
27
  export interface BuilderComponentsMap {
28
28
  [ComponentType.ActionRow]: ActionRow;
@@ -86,7 +86,7 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
86
86
  embeds: body?.embeds?.map(x => (x instanceof builders_1.Embed ? x.toJSON() : x)),
87
87
  poll: poll ? (poll instanceof builders_1.PollBuilder ? poll.toJSON() : poll) : undefined,
88
88
  };
89
- if ('attachments' in body) {
89
+ if (Array.isArray(body.attachments)) {
90
90
  payload.attachments =
91
91
  body.attachments?.map((x, i) => ({
92
92
  id: x.id ?? i.toString(),
@@ -370,7 +370,7 @@ export interface APISectionComponent {
370
370
  /** Optional identifier for component */
371
371
  id?: number;
372
372
  /** One to three text components */
373
- components: APITextDispalyComponent[];
373
+ components: APITextDisplayComponent[];
374
374
  /** A thumbnail or a button component, with a future possibility of adding more compatible components */
375
375
  accessory: APIButtonComponent | APIThumbnailComponent;
376
376
  }
@@ -380,7 +380,7 @@ export interface APISectionComponent {
380
380
  * A Text Display is a top-level content component that allows you to add text to your message formatted with markdown and mention users and roles. This is similar to the content field of a message, but allows you to add multiple text components, controlling the layout of your message.
381
381
  * Text Displays are only available in messages.
382
382
  */
383
- export interface APITextDispalyComponent {
383
+ export interface APITextDisplayComponent {
384
384
  /** 10 for text display */
385
385
  type: ComponentType.TextDisplay;
386
386
  /** Optional identifier for component */
@@ -465,7 +465,7 @@ export declare enum Spacing {
465
465
  /** For large padding */
466
466
  Large = 2
467
467
  }
468
- export type APIContainerComponents = APIActionRowComponent<APIActionRowComponentTypes> | APITextDispalyComponent | APISectionComponent | APIMediaGalleryComponent | APIFileComponent | APISeparatorComponent | APIThumbnailComponent;
468
+ export type APIContainerComponents = APIActionRowComponent<APIActionRowComponentTypes> | APITextDisplayComponent | APISectionComponent | APIMediaGalleryComponent | APIFileComponent | APISeparatorComponent | APIThumbnailComponent;
469
469
  /**
470
470
  * https://discord.com/developers/docs/components/reference#container
471
471
  */
@@ -486,4 +486,4 @@ export interface APIContainerComponent {
486
486
  */
487
487
  export interface APIUnfurledMediaItem extends Identify<MakeRequired<Partial<Pick<APIAttachment, 'url' | 'proxy_url' | 'height' | 'width' | 'content_type'>>, 'url'>> {
488
488
  }
489
- export type APITopLevelComponent = APIContainerComponent | APIActionRowComponent<APIActionRowComponentTypes> | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDispalyComponent;
489
+ export type APITopLevelComponent = APIContainerComponent | APIActionRowComponent<APIActionRowComponentTypes> | APIFileComponent | APIMediaGalleryComponent | APISectionComponent | APISeparatorComponent | APITextDisplayComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "3.1.1-dev-14693940279.0",
3
+ "version": "3.1.1-dev-14694263034.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",