chore: package version

This commit is contained in:
MARCROCK22 2025-04-27 14:23:12 -04:00
commit c5ae765263
6 changed files with 12 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "seyfert", "name": "seyfert",
"version": "3.1.0", "version": "3.1.1",
"description": "The most advanced framework for discord bots", "description": "The most advanced framework for discord bots",
"main": "./lib/index.js", "main": "./lib/index.js",
"module": "./lib/index.js", "module": "./lib/index.js",

View File

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

View File

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

View File

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

View File

@ -196,7 +196,7 @@ export class BaseInteraction<
poll: poll ? (poll instanceof PollBuilder ? poll.toJSON() : poll) : undefined, poll: poll ? (poll instanceof PollBuilder ? poll.toJSON() : poll) : undefined,
}; };
if ('attachments' in body) { if (Array.isArray(body.attachments)) {
payload.attachments = payload.attachments =
body.attachments?.map((x, i) => ({ body.attachments?.map((x, i) => ({
id: x.id ?? i.toString(), id: x.id ?? i.toString(),

View File

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