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