diff --git a/package.json b/package.json index 5db9b07..6a3b9b6 100644 --- a/package.json +++ b/package.json @@ -1,76 +1,73 @@ -{ - "name": "seyfert", - "version": "1.5.0", - "description": "The most advanced framework for discord bots", - "main": "./lib/index.js", - "module": "./lib/index.js", - "types": "./lib/index.d.ts", - "files": [ - "lib/**" - ], - "scripts": { - "build": "tsc --outDir ./lib", - "prepublishOnly": "npm run build", - "prepare": "npm run build && husky", - "lint": "biome lint --write ./src", - "format": "biome format --write ./src", - "check-h": "biome check --write ./src", - "check": "biome check --write --no-errors-on-unmatched ./src" - }, - "author": "MARCROCK22", - "license": "Apache-2.0", - "lint-staged": { - "*.ts": [ - "biome check --write" - ] - }, - "devDependencies": { - "@biomejs/biome": "1.8.3", - "@commitlint/cli": "^19.4.0", - "@commitlint/config-conventional": "^19.2.2", - "husky": "^9.1.4", - "lint-staged": "^15.2.9", - "typescript": "^5.5.4" - }, - "optionalDependencies": { - "chokidar": "^3.6.0", - "ioredis": "^5.4.1" - }, - "homepage": "https://seyfert.dev", - "repository": { - "type": "git", - "url": "git+https://github.com/tiramisulabs/seyfert.git" - }, - "bugs": { - "url": "https://github.com/tiramisulabs/seyfert" - }, - "keywords": [ - "api", - "discord", - "bots", - "typescript", - "botdev" - ], - "publishConfig": { - "access": "public" - }, - "maintainers": [ - { - "name": "socram03", - "url": "https://github.com/socram03" - } - ], - "contributors": [ - { - "name": "Free 公園", - "url": "https://github.com/FreeAoi" - }, - { - "name": "David", - "url": "https://github.com/Drylozu" - } - ], - "trustedDependencies": [ - "@biomejs/biome" - ] -} +{ + "name": "seyfert", + "version": "1.5.0", + "description": "The most advanced framework for discord bots", + "main": "./lib/index.js", + "module": "./lib/index.js", + "types": "./lib/index.d.ts", + "files": [ + "lib/**" + ], + "scripts": { + "build": "tsc --outDir ./lib", + "prepublishOnly": "npm run build", + "prepare": "npm run build && husky", + "lint": "biome lint --write ./src", + "format": "biome format --write ./src", + "check-h": "biome check --write ./src", + "check": "biome check --write --no-errors-on-unmatched ./src" + }, + "author": "MARCROCK22", + "license": "Apache-2.0", + "lint-staged": { + "*.ts": [ + "biome check --write" + ] + }, + "devDependencies": { + "@biomejs/biome": "1.8.3", + "@commitlint/cli": "^19.4.0", + "@commitlint/config-conventional": "^19.2.2", + "husky": "^9.1.4", + "lint-staged": "^15.2.9", + "typescript": "^5.5.4" + }, + "optionalDependencies": { + "chokidar": "^3.6.0", + "ioredis": "^5.4.1" + }, + "homepage": "https://seyfert.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/tiramisulabs/seyfert.git" + }, + "bugs": { + "url": "https://github.com/tiramisulabs/seyfert" + }, + "keywords": [ + "api", + "discord", + "bots", + "typescript", + "botdev" + ], + "publishConfig": { + "access": "public" + }, + "maintainers": [ + { + "name": "socram03", + "url": "https://github.com/socram03" + } + ], + "contributors": [ + { + "name": "Free 公園", + "url": "https://github.com/FreeAoi" + }, + { + "name": "David", + "url": "https://github.com/Drylozu" + } + ] +} diff --git a/src/cache/resources/channels.ts b/src/cache/resources/channels.ts index 5c6ced4..d0bccbe 100644 --- a/src/cache/resources/channels.ts +++ b/src/cache/resources/channels.ts @@ -1,7 +1,6 @@ import type { APIChannel } from '../../types'; import { fakePromise } from '../../common'; -import type { AllChannels } from '../../structures'; -import channelFrom from '../../structures/channels'; +import { channelFrom, type AllChannels } from '../../structures'; import type { ReturnCache } from '../index'; import { GuildRelatedResource } from './default/guild-related'; diff --git a/src/commands/optionresolver.ts b/src/commands/optionresolver.ts index 3f3f56d..321fa07 100644 --- a/src/commands/optionresolver.ts +++ b/src/commands/optionresolver.ts @@ -8,10 +8,8 @@ import { type APIUser, ApplicationCommandOptionType, } from '../types'; -import { Attachment } from '..'; import type { MakeRequired } from '../common'; -import type { AllChannels } from '../structures'; -import channelFrom from '../structures/channels'; +import { channelFrom, type AllChannels } from '../structures'; import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat'; import type { UsingClient } from './applications/shared'; import { @@ -21,6 +19,7 @@ import { Transformers, type UserStructure, } from '../client/transformers'; +import { Attachment } from '../builders'; export type ContextOptionsResolved = { members?: Record | APIInteractionGuildMember>; diff --git a/src/common/shorters/channels.ts b/src/common/shorters/channels.ts index 91654f2..86b4d0f 100644 --- a/src/common/shorters/channels.ts +++ b/src/common/shorters/channels.ts @@ -6,8 +6,7 @@ import type { RESTPostAPIGuildForumThreadsJSONBody, APIGuildChannel, } from '../../types'; -import { BaseChannel, type GuildRole, type GuildMember } from '../../structures'; -import channelFrom, { type AllChannels } from '../../structures/channels'; +import { BaseChannel, type GuildRole, type GuildMember, type AllChannels, channelFrom } from '../../structures'; import { PermissionsBitField } from '../../structures/extra/Permissions'; import { BaseShorter } from './base'; import { MergeOptions } from '../it/utils'; diff --git a/src/common/shorters/guilds.ts b/src/common/shorters/guilds.ts index 84d2e7e..f733169 100644 --- a/src/common/shorters/guilds.ts +++ b/src/common/shorters/guilds.ts @@ -12,8 +12,7 @@ import type { RESTPostAPIGuildsJSONBody, } from '../../types'; import { resolveFiles } from '../../builders'; -import { BaseChannel, Guild, GuildMember, type CreateStickerBodyRequest } from '../../structures'; -import channelFrom from '../../structures/channels'; +import { BaseChannel, channelFrom, Guild, GuildMember, type CreateStickerBodyRequest } from '../../structures'; import { BaseShorter } from './base'; import { type GuildStructure, Transformers } from '../../client/transformers'; diff --git a/src/common/shorters/threads.ts b/src/common/shorters/threads.ts index 703b33b..2ae8d07 100644 --- a/src/common/shorters/threads.ts +++ b/src/common/shorters/threads.ts @@ -7,10 +7,10 @@ import type { RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody, } from '../../types'; -import channelFrom from '../../structures/channels'; import { BaseShorter } from './base'; import type { MakeRequired, When } from '../types/util'; import type { ThreadChannelStructure } from '../../client/transformers'; +import { channelFrom } from '../../structures'; export class ThreadShorter extends BaseShorter { /** diff --git a/src/events/hooks/channel.ts b/src/events/hooks/channel.ts index e6e03ed..2730142 100644 --- a/src/events/hooks/channel.ts +++ b/src/events/hooks/channel.ts @@ -6,8 +6,7 @@ import type { } from '../../types'; import { toCamelCase } from '../../common'; -import type { AllChannels } from '../../structures'; -import channelFrom from '../../structures/channels'; +import { channelFrom, type AllChannels } from '../../structures'; import type { UsingClient } from '../../commands'; export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => {