mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
chore: package version
This commit is contained in:
commit
c5ae765263
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "seyfert",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"description": "The most advanced framework for discord bots",
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ import type { OmitInsert } from './util';
|
||||
|
||||
export interface ResolverProps {
|
||||
embeds?: Embed[] | APIEmbed[] | undefined;
|
||||
components?: TopLevelBuilders[];
|
||||
components?: TopLevelBuilders[] | ReturnType<TopLevelBuilders['toJSON']>[];
|
||||
files?: AttachmentBuilder[] | Attachment[] | RawFile[] | undefined;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -196,7 +196,7 @@ export class BaseInteraction<
|
||||
poll: poll ? (poll instanceof PollBuilder ? poll.toJSON() : poll) : undefined,
|
||||
};
|
||||
|
||||
if ('attachments' in body) {
|
||||
if (Array.isArray(body.attachments)) {
|
||||
payload.attachments =
|
||||
body.attachments?.map((x, i) => ({
|
||||
id: x.id ?? i.toString(),
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user