mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
parent
88d687d697
commit
d14c85b724
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@biscuitland/common",
|
"name": "@biscuitland/common",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@biscuitland/core",
|
"name": "@biscuitland/core",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@ -23,9 +23,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@biscuitland/common": "^0.0.2",
|
"@biscuitland/common": "^0.0.3",
|
||||||
"@biscuitland/rest": "^3.0.1",
|
"@biscuitland/rest": "^3.0.2",
|
||||||
"@biscuitland/ws": "^3.0.1",
|
"@biscuitland/ws": "^3.0.2",
|
||||||
"eventemitter2": "^6.4.9"
|
"eventemitter2": "^6.4.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import type { BiscuitRESTOptions, CDNRoutes, Routes } from '@biscuitland/rest';
|
import type { BiscuitRESTOptions, CDNRoutes, Routes } from '@biscuitland/rest';
|
||||||
import { CDN, BiscuitREST, Router } from '@biscuitland/rest';
|
import { CDN, BiscuitREST, Router } from '@biscuitland/rest';
|
||||||
import { When } from '@biscuitland/common';
|
import { When } from '@biscuitland/common';
|
||||||
import { EventEmitter2 } from 'eventemitter2';
|
import EventEmitter2 from 'eventemitter2';
|
||||||
import { MainManager, getBotIdFromToken } from '.';
|
import { MainManager, getBotIdFromToken } from '.';
|
||||||
import { GatewayManager, CreateGatewayManagerOptions, GatewayEvents } from '@biscuitland/ws';
|
import { GatewayManager, CreateGatewayManagerOptions, GatewayEvents } from '@biscuitland/ws';
|
||||||
import { GatewayIntentBits } from '@biscuitland/common';
|
import { GatewayIntentBits } from '@biscuitland/common';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@biscuitland/helpers",
|
"name": "@biscuitland/helpers",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@ -23,7 +23,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@biscuitland/common": "^0.0.2"
|
"@biscuitland/common": "^0.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.7.14",
|
"@types/node": "^18.7.14",
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
import {
|
import { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, ObjectToLower, TypeArray, toSnakeCase } from '@biscuitland/common';
|
||||||
APIEmbed,
|
|
||||||
APIEmbedAuthor,
|
|
||||||
APIEmbedField,
|
|
||||||
APIEmbedFooter,
|
|
||||||
ObjectToLower,
|
|
||||||
TypeArray,
|
|
||||||
toSnakeCase
|
|
||||||
} from '@biscuitland/common';
|
|
||||||
|
|
||||||
export class MessageEmbed {
|
export class MessageEmbed {
|
||||||
constructor(public data: Partial<APIEmbed> = {}) {
|
constructor(public data: Partial<APIEmbed> = {}) {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
import {
|
import { APIMessageActionRowComponent, APIModalActionRowComponent, ComponentType, PermissionFlagsBits } from '@biscuitland/common';
|
||||||
APIMessageActionRowComponent,
|
|
||||||
APIModalActionRowComponent,
|
|
||||||
ComponentType,
|
|
||||||
PermissionFlagsBits
|
|
||||||
} from '@biscuitland/common';
|
|
||||||
import {
|
import {
|
||||||
ChannelSelectMenu,
|
ChannelSelectMenu,
|
||||||
MentionableSelectMenu,
|
MentionableSelectMenu,
|
||||||
@ -18,9 +13,7 @@ import { BaseComponent } from './components/BaseComponent';
|
|||||||
export function createComponent(data: APIMessageActionRowComponent): HelperComponents;
|
export function createComponent(data: APIMessageActionRowComponent): HelperComponents;
|
||||||
export function createComponent(data: APIModalActionRowComponent): HelperComponents;
|
export function createComponent(data: APIModalActionRowComponent): HelperComponents;
|
||||||
export function createComponent(data: HelperComponents): HelperComponents;
|
export function createComponent(data: HelperComponents): HelperComponents;
|
||||||
export function createComponent(
|
export function createComponent(data: HelperComponents | APIMessageActionRowComponent | APIModalActionRowComponent): HelperComponents {
|
||||||
data: HelperComponents | APIMessageActionRowComponent | APIModalActionRowComponent
|
|
||||||
): HelperComponents {
|
|
||||||
if (data instanceof BaseComponent) {
|
if (data instanceof BaseComponent) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -45,11 +38,6 @@ export function createComponent(
|
|||||||
|
|
||||||
export type PermissionsStrings = `${keyof typeof PermissionFlagsBits}`;
|
export type PermissionsStrings = `${keyof typeof PermissionFlagsBits}`;
|
||||||
export type OptionValuesLength = { max: number; min: number };
|
export type OptionValuesLength = { max: number; min: number };
|
||||||
export type MessageSelectMenus =
|
export type MessageSelectMenus = RoleSelectMenu | UserSelectMenu | StringSelectMenu | ChannelSelectMenu | MentionableSelectMenu;
|
||||||
| RoleSelectMenu
|
|
||||||
| UserSelectMenu
|
|
||||||
| StringSelectMenu
|
|
||||||
| ChannelSelectMenu
|
|
||||||
| MentionableSelectMenu;
|
|
||||||
export type MessageComponents = MessageButton | MessageSelectMenus;
|
export type MessageComponents = MessageButton | MessageSelectMenus;
|
||||||
export type HelperComponents = MessageComponents | ModalTextInput;
|
export type HelperComponents = MessageComponents | ModalTextInput;
|
||||||
|
@ -94,9 +94,7 @@ export interface APIApplicationCommandStringOption<AC extends boolean = boolean>
|
|||||||
choices: When<AC, APIApplicationCommandOptionChoice<string>[], never>;
|
choices: When<AC, APIApplicationCommandOptionChoice<string>[], never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SlashStringOption<AC extends boolean = boolean> extends SlashRequiredOption<
|
export class SlashStringOption<AC extends boolean = boolean> extends SlashRequiredOption<APIApplicationCommandStringOption<AC>> {
|
||||||
APIApplicationCommandStringOption<AC>
|
|
||||||
> {
|
|
||||||
constructor(data: Partial<APIApplicationCommandStringOption<AC>> = {}) {
|
constructor(data: Partial<APIApplicationCommandStringOption<AC>> = {}) {
|
||||||
super({ ...data, type: ApplicationCommandOptionType.String });
|
super({ ...data, type: ApplicationCommandOptionType.String });
|
||||||
}
|
}
|
||||||
@ -142,9 +140,7 @@ interface APIApplicationCommandNumberOption<AC extends boolean = boolean>
|
|||||||
choices: When<AC, APIApplicationCommandOptionChoice<number>[], never>;
|
choices: When<AC, APIApplicationCommandOptionChoice<number>[], never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SlashNumberOption<AC extends boolean = boolean> extends SlashRequiredOption<
|
export class SlashNumberOption<AC extends boolean = boolean> extends SlashRequiredOption<APIApplicationCommandNumberOption<AC>> {
|
||||||
APIApplicationCommandNumberOption<AC>
|
|
||||||
> {
|
|
||||||
constructor(data: Partial<APIApplicationCommandNumberOption<AC>> = {}) {
|
constructor(data: Partial<APIApplicationCommandNumberOption<AC>> = {}) {
|
||||||
super({ ...data, type: ApplicationCommandOptionType.Number });
|
super({ ...data, type: ApplicationCommandOptionType.Number });
|
||||||
}
|
}
|
||||||
@ -190,9 +186,7 @@ interface APIApplicationCommandIntegerOption<AC extends boolean = boolean>
|
|||||||
choices: When<AC, APIApplicationCommandOptionChoice<number>[], never>;
|
choices: When<AC, APIApplicationCommandOptionChoice<number>[], never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SlashIntegerOption<AC extends boolean = boolean> extends SlashRequiredOption<
|
export class SlashIntegerOption<AC extends boolean = boolean> extends SlashRequiredOption<APIApplicationCommandIntegerOption<AC>> {
|
||||||
APIApplicationCommandIntegerOption<AC>
|
|
||||||
> {
|
|
||||||
constructor(data: Partial<APIApplicationCommandIntegerOption<AC>> = {}) {
|
constructor(data: Partial<APIApplicationCommandIntegerOption<AC>> = {}) {
|
||||||
super({ ...data, type: ApplicationCommandOptionType.Integer });
|
super({ ...data, type: ApplicationCommandOptionType.Integer });
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,7 @@ import { APIActionRowComponent, APIMessageActionRowComponent, ComponentType, Typ
|
|||||||
import { MessageComponents, createComponent } from '../Utils';
|
import { MessageComponents, createComponent } from '../Utils';
|
||||||
import { BaseComponent } from './BaseComponent';
|
import { BaseComponent } from './BaseComponent';
|
||||||
|
|
||||||
export class MessageActionRow<T extends MessageComponents> extends BaseComponent<
|
export class MessageActionRow<T extends MessageComponents> extends BaseComponent<APIActionRowComponent<APIMessageActionRowComponent>> {
|
||||||
APIActionRowComponent<APIMessageActionRowComponent>
|
|
||||||
> {
|
|
||||||
constructor({ components, ...data }: Partial<APIActionRowComponent<APIMessageActionRowComponent>>) {
|
constructor({ components, ...data }: Partial<APIActionRowComponent<APIMessageActionRowComponent>>) {
|
||||||
super({ ...data, type: ComponentType.ActionRow });
|
super({ ...data, type: ComponentType.ActionRow });
|
||||||
this.components = (components?.map(createComponent) ?? []) as T[];
|
this.components = (components?.map(createComponent) ?? []) as T[];
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { APIBaseComponent, ComponentType } from '@biscuitland/common';
|
import { APIBaseComponent, ComponentType } from '@biscuitland/common';
|
||||||
|
|
||||||
export abstract class BaseComponent<
|
export abstract class BaseComponent<TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,> {
|
||||||
TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,
|
|
||||||
> {
|
|
||||||
constructor(public data: Partial<TYPE>) {}
|
constructor(public data: Partial<TYPE>) {}
|
||||||
|
|
||||||
toJSON(): TYPE {
|
toJSON(): TYPE {
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
import {
|
import { APIButtonComponentBase, APIMessageComponentEmoji, ButtonStyle, ComponentType, When } from '@biscuitland/common';
|
||||||
APIButtonComponentBase,
|
|
||||||
APIMessageComponentEmoji,
|
|
||||||
ButtonStyle,
|
|
||||||
ComponentType,
|
|
||||||
When
|
|
||||||
} from '@biscuitland/common';
|
|
||||||
import { BaseComponent } from './BaseComponent';
|
import { BaseComponent } from './BaseComponent';
|
||||||
|
|
||||||
export type ButtonStylesForID = Exclude<ButtonStyle, ButtonStyle.Link>;
|
export type ButtonStylesForID = Exclude<ButtonStyle, ButtonStyle.Link>;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@biscuitland/rest",
|
"name": "@biscuitland/rest",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@biscuitland/ws",
|
"name": "@biscuitland/ws",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@ -24,8 +24,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@biscuitland/common": "^0.0.2",
|
"@biscuitland/common": "^0.0.3",
|
||||||
"@biscuitland/rest": "^3.0.1",
|
"@biscuitland/rest": "^3.0.2",
|
||||||
"ws": "^8.13.0"
|
"ws": "^8.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user