fix: type typo

This commit is contained in:
MARCROCK22 2025-04-27 12:26:47 -04:00
parent f4bcaa58ec
commit 5a90b7edb4
4 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import { type APITextDispalyComponent, ComponentType } from '../types';
import { type APITextDisplayComponent, ComponentType } from '../types';
import { BaseComponentBuilder } from './Base';
/**
@ -9,12 +9,12 @@ import { BaseComponentBuilder } from './Base';
* const text = new TextDisplay().content('Hello, world!');
* ```
*/
export class TextDisplay extends BaseComponentBuilder<APITextDispalyComponent> {
export class TextDisplay extends BaseComponentBuilder<APITextDisplayComponent> {
/**
* Constructs a new TextDisplay component.
* @param data Optional initial data for the text display component.
*/
constructor(data: Partial<APITextDispalyComponent> = {}) {
constructor(data: Partial<APITextDisplayComponent> = {}) {
super({ type: ComponentType.TextDisplay, ...data });
}

View File

@ -17,7 +17,7 @@ import type { OmitInsert } from './util';
export interface ResolverProps {
embeds?: Embed[] | APIEmbed[] | undefined;
components?: TopLevelBuilders[] | TopLevelBuilders['toJSON'][];
components?: TopLevelBuilders[] | ReturnType<TopLevelBuilders['toJSON']>[];
files?: AttachmentBuilder[] | Attachment[] | RawFile[] | undefined;
}

View File

@ -29,7 +29,7 @@ import {
type APISectionComponent,
type APISeparatorComponent,
type APIStringSelectComponent,
type APITextDispalyComponent,
type APITextDisplayComponent,
type APITextInputComponent,
type APIThumbnailComponent,
type APIUserSelectComponent,
@ -66,7 +66,7 @@ export interface APIComponentsMap {
[ComponentType.Container]: APIContainerComponent;
[ComponentType.MediaGallery]: APIMediaGalleryComponent;
[ComponentType.Separator]: APISeparatorComponent;
[ComponentType.TextDisplay]: APITextDispalyComponent;
[ComponentType.TextDisplay]: APITextDisplayComponent;
}
export interface BuilderComponentsMap {

View File

@ -448,7 +448,7 @@ export interface APISectionComponent {
/** Optional identifier for component */
id?: number;
/** One to three text components */
components: APITextDispalyComponent[];
components: APITextDisplayComponent[];
/** A thumbnail or a button component, with a future possibility of adding more compatible components */
accessory: APIButtonComponent | APIThumbnailComponent;
}
@ -459,7 +459,7 @@ export interface APISectionComponent {
* 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.
* Text Displays are only available in messages.
*/
export interface APITextDispalyComponent {
export interface APITextDisplayComponent {
/** 10 for text display */
type: ComponentType.TextDisplay;
/** Optional identifier for component */
@ -553,7 +553,7 @@ export enum Spacing {
export type APIContainerComponents =
| APIActionRowComponent<APIActionRowComponentTypes>
| APITextDispalyComponent
| APITextDisplayComponent
| APISectionComponent
| APIMediaGalleryComponent
| APIFileComponent
@ -591,4 +591,4 @@ export type APITopLevelComponent =
| APIMediaGalleryComponent
| APISectionComponent
| APISeparatorComponent
| APITextDispalyComponent;
| APITextDisplayComponent;