mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 16:30:08 +00:00
refactor: discordeno
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
export * from '@discordeno/types'
|
||||
export * from '@discordeno/utils'
|
||||
export * from './client.js'
|
||||
export * from './handlers/index.js'
|
||||
export * from './transformers/index.js'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { DiscordComponent } from '@discordeno/types'
|
||||
import { Client } from '../client.js'
|
||||
import {
|
||||
ButtonStyles,
|
||||
DiscordComponent,
|
||||
MessageComponentTypes,
|
||||
SelectOption,
|
||||
TextStyles
|
||||
} from '../index.js'
|
||||
} from '@discordeno/types'
|
||||
import { Client } from '../client.js'
|
||||
|
||||
export function transformComponent (
|
||||
client: Client,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
AllowedMentions,
|
||||
Client,
|
||||
DiscordAllowedMentions
|
||||
} from '../../index.js'
|
||||
import { AllowedMentions, DiscordAllowedMentions } from '@discordeno/types'
|
||||
import { Client } from '../../client.js'
|
||||
|
||||
export function transformAllowedMentionsToDiscordAllowedMentions (
|
||||
client: Client,
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"test:test-type": "tsc --project tsconfig.test.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordeno/bot": "18.0.0-alpha.1",
|
||||
"@discordeno/client": "18.0.0-alpha.1",
|
||||
"@discordeno/gateway": "18.0.0-alpha.1",
|
||||
"@discordeno/rest": "18.0.0-alpha.1"
|
||||
"@discordeno/rest": "18.0.0-alpha.1",
|
||||
"@discordeno/utils": "18.0.0-alpha.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordeno/types": "18.0.0-alpha.1",
|
||||
|
||||
111
packages/discordeno/src/bot.ts
Normal file
111
packages/discordeno/src/bot.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import { Client, createClient, CreateClientOptions } from '@discordeno/client'
|
||||
import {
|
||||
createGatewayManager,
|
||||
ShardSocketCloseCodes
|
||||
} from '@discordeno/gateway'
|
||||
import { createRestManager, CreateRestManagerOptions } from '@discordeno/rest'
|
||||
import {
|
||||
DiscordGatewayPayload,
|
||||
Errors,
|
||||
GatewayDispatchEventNames,
|
||||
GetGatewayBot
|
||||
} from '@discordeno/types'
|
||||
|
||||
import {
|
||||
baseEndpoints,
|
||||
CHANNEL_MENTION_REGEX,
|
||||
CONTEXT_MENU_COMMANDS_NAME_REGEX,
|
||||
DISCORDENO_VERSION,
|
||||
DISCORD_SNOWFLAKE_REGEX,
|
||||
SLASH_COMMANDS_NAME_REGEX,
|
||||
USER_AGENT
|
||||
} from '@discordeno/utils'
|
||||
|
||||
export function createBot (options: CreateBotOptions): Bot {
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
const bot = {
|
||||
...createClient(options),
|
||||
botGatewayData: options.botGatewayData,
|
||||
rest: createRestManager({
|
||||
token: options.token,
|
||||
debug: options.events?.debug,
|
||||
secretKey: options.secretKey ?? undefined
|
||||
})
|
||||
} as Bot
|
||||
|
||||
bot.gateway = createGatewayManager({
|
||||
gatewayBot: bot.botGatewayData ?? ({} as any),
|
||||
gatewayConfig: {
|
||||
token: options.token,
|
||||
intents: options.intents
|
||||
},
|
||||
|
||||
debug: bot.events.debug,
|
||||
|
||||
handleDiscordPayload:
|
||||
bot.handleDiscordPayload ??
|
||||
async function (shard, data: DiscordGatewayPayload) {
|
||||
// TRIGGER RAW EVENT
|
||||
bot.events.raw(bot, data, shard.id)
|
||||
|
||||
if (!data.t) return
|
||||
|
||||
// RUN DISPATCH CHECK
|
||||
await bot.events.dispatchRequirements(bot, data, shard.id)
|
||||
bot.handlers[data.t as GatewayDispatchEventNames]?.(
|
||||
bot,
|
||||
data,
|
||||
shard.id
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
return bot
|
||||
}
|
||||
|
||||
export async function startBot (bot: Bot): Promise<void> {
|
||||
if (Object.keys(bot.botGatewayData ?? {}).length === 0) {
|
||||
bot.gateway.gatewayBot = await bot.rest.helpers.getGatewayBot()
|
||||
bot.gateway.lastShardId = bot.gateway.gatewayBot.shards - 1
|
||||
bot.gateway.manager.totalShards = bot.gateway.gatewayBot.shards
|
||||
}
|
||||
|
||||
bot.gateway.spawnShards()
|
||||
}
|
||||
|
||||
export async function stopBot (bot: Bot): Promise<Bot> {
|
||||
await bot.gateway.stop(
|
||||
ShardSocketCloseCodes.Shutdown,
|
||||
'User requested bot stop'
|
||||
)
|
||||
|
||||
return bot
|
||||
}
|
||||
|
||||
export interface CreateBotOptions extends CreateClientOptions {
|
||||
botGatewayData?: GetGatewayBot
|
||||
rest?: Omit<CreateRestManagerOptions, 'token'>
|
||||
}
|
||||
|
||||
export interface Bot extends Client {
|
||||
botGatewayData?: GetGatewayBot
|
||||
rest: ReturnType<typeof createRestManager>
|
||||
gateway: ReturnType<typeof createGatewayManager>
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export function createBotConstants () {
|
||||
return {
|
||||
DISCORDENO_VERSION,
|
||||
USER_AGENT,
|
||||
BASE_URL: baseEndpoints.BASE_URL,
|
||||
CDN_URL: baseEndpoints.CDN_URL,
|
||||
regexes: {
|
||||
SLASH_COMMANDS_NAME_REGEX,
|
||||
CONTEXT_MENU_COMMANDS_NAME_REGEX,
|
||||
CHANNEL_MENTION_REGEX,
|
||||
DISCORD_SNOWFLAKE_REGEX
|
||||
},
|
||||
Errors
|
||||
}
|
||||
}
|
||||
@@ -1 +1,5 @@
|
||||
export * from '@discordeno/bot'
|
||||
export * as client from '@discordeno/client'
|
||||
export * as gateway from '@discordeno/gateway'
|
||||
export * as rest from '@discordeno/rest'
|
||||
export * from '@discordeno/utils'
|
||||
export * from './bot.js'
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { calculateShardId } from './utils/index.js'
|
||||
export * from '@discordeno/types'
|
||||
export * from '@discordeno/utils'
|
||||
export * from './manager/index.js'
|
||||
export * from './shard/index.js'
|
||||
export { calculateShardId }
|
||||
export * from './utils/index.js'
|
||||
|
||||
@@ -3,10 +3,10 @@ import {
|
||||
ChannelTypes,
|
||||
DiscordChannel,
|
||||
OverwriteReadable,
|
||||
SortOrderTypes
|
||||
SortOrderTypes,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { calculateBits } from '@discordeno/utils'
|
||||
import { WithReason } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Channel } from '../../transformers/channel.js'
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ import {
|
||||
DiscordChannel,
|
||||
OverwriteReadable,
|
||||
SortOrderTypes,
|
||||
VideoQualityModes
|
||||
VideoQualityModes,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { calculateBits } from '@discordeno/utils'
|
||||
import { WithReason } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Channel } from '../../transformers/channel.js'
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { OverwriteReadable } from '@discordeno/types'
|
||||
import { BigString, OverwriteReadable, WithReason } from '@discordeno/types'
|
||||
import { calculateBits } from '@discordeno/utils'
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DiscordStageInstance } from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../../index.js'
|
||||
import { BigString, DiscordStageInstance, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { StageInstance } from '../../../transformers/stageInstance.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DiscordStageInstance } from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../../index.js'
|
||||
import { BigString, DiscordStageInstance, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { StageInstance } from '../../../transformers/stageInstance.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DiscordChannel } from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../../index.js'
|
||||
import { BigString, DiscordChannel, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { Channel } from '../../../transformers/channel.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { BigString, ChannelTypes, DiscordChannel } from '@discordeno/types'
|
||||
import { WithReason } from '../../../index.js'
|
||||
import {
|
||||
BigString,
|
||||
ChannelTypes,
|
||||
DiscordChannel,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { Channel } from '../../../transformers/channel.js'
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { DiscordEmoji } from '@discordeno/types'
|
||||
import { BigString, DiscordEmoji, WithReason } from '@discordeno/types'
|
||||
import { urlToBase64 } from '@discordeno/utils'
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Emoji } from '../../transformers/emoji.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DiscordEmoji } from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import { BigString, DiscordEmoji, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Emoji } from '../../transformers/emoji.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString } from '@discordeno/types'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
|
||||
/**
|
||||
* Builds a URL to an emoji in the Discord CDN.
|
||||
|
||||
@@ -2,12 +2,13 @@ import {
|
||||
AutoModerationActionType,
|
||||
AutoModerationEventTypes,
|
||||
AutoModerationTriggerTypes,
|
||||
BigString,
|
||||
DiscordAutoModerationRule,
|
||||
DiscordAutoModerationRuleTriggerMetadataPresets,
|
||||
DiscordCreateAutomoderationRule
|
||||
DiscordCreateAutomoderationRule,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../../index.js'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { AutoModerationRule } from '../../../transformers/automodRule.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString } from '@discordeno/types'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
|
||||
/**
|
||||
* Deletes an automod rule.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import {
|
||||
AutoModerationActionType,
|
||||
AutoModerationEventTypes,
|
||||
BigString,
|
||||
DiscordAutoModerationRule,
|
||||
DiscordAutoModerationRuleTriggerMetadataPresets
|
||||
DiscordAutoModerationRuleTriggerMetadataPresets,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../../index.js'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { AutoModerationRule } from '../../../transformers/automodRule.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString, DiscordAutoModerationRule } from '@discordeno/types'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { AutoModerationRule } from '../../../transformers/automodRule.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigString, DiscordAutoModerationRule } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { AutoModerationRule } from '../../../transformers/automodRule.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { BigString, MfaLevels } from '@discordeno/types'
|
||||
import type { RestManager } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
|
||||
/** Modify a guild's MFA level. Requires guild ownership. */
|
||||
export async function editGuildMfaLevel (
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
BigString,
|
||||
DiscordScheduledEvent,
|
||||
ScheduledEventEntityType,
|
||||
ScheduledEventPrivacyLevel
|
||||
ScheduledEventPrivacyLevel,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { validateLength } from '@discordeno/utils'
|
||||
import { WithReason } from '../../../index.js'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { ScheduledEvent } from '../../../transformers/scheduledEvent.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString } from '@discordeno/types'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
|
||||
/**
|
||||
* Deletes a scheduled event from a guild.
|
||||
|
||||
@@ -3,11 +3,11 @@ import {
|
||||
DiscordScheduledEvent,
|
||||
ScheduledEventEntityType,
|
||||
ScheduledEventPrivacyLevel,
|
||||
ScheduledEventStatus
|
||||
ScheduledEventStatus,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import { validateLength } from '@discordeno/utils'
|
||||
import { WithReason } from '../../../index.js'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { ScheduledEvent } from '../../../transformers/scheduledEvent.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString, DiscordScheduledEvent } from '@discordeno/types'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { ScheduledEvent } from '../../../transformers/scheduledEvent.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigString, DiscordMember, DiscordUser } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { Member, User } from '../../../transformers/member.js'
|
||||
|
||||
// TODO: This endpoint discards certain data from the result.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigString, DiscordScheduledEvent } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { ScheduledEvent } from '../../../transformers/scheduledEvent.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { BigString, DiscordInvite, TargetTypes } from '@discordeno/types'
|
||||
import { WithReason } from '../../../index.js'
|
||||
import {
|
||||
BigString,
|
||||
DiscordInvite,
|
||||
TargetTypes,
|
||||
WithReason
|
||||
} from '@discordeno/types'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { BaseInvite } from './getInvite.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString, DiscordApplicationCommand } from '@discordeno/types'
|
||||
import { RestManager } from '../../../restManager.js'
|
||||
import type { RestManager } from '../../../restManager.js'
|
||||
import { ApplicationCommand } from '../../../transformers/applicationCommand.js'
|
||||
import { CreateApplicationCommand } from '../../../types.js'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import { BigString, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BigString, DiscordMember, WithReason } from '../../index.js'
|
||||
import { BigString, DiscordMember, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Member } from '../../transformers/member.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BigString } from '@discordeno/types'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
|
||||
/**
|
||||
* Kicks a member from a guild.
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { DiscordMemberWithUser, SearchMembers } from '@discordeno/types'
|
||||
|
||||
import { BigString } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Member } from '../../transformers/member.js'
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,9 @@ export async function searchMembers (
|
||||
options?: Omit<SearchMembers, 'query'>
|
||||
): Promise<Collection<bigint, Member>> {
|
||||
if (options?.limit) {
|
||||
if (options.limit < 1) { throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW) }
|
||||
if (options.limit < 1) {
|
||||
throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW)
|
||||
}
|
||||
if (options.limit > 1000) {
|
||||
throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_HIGH)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DiscordStickerPack } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { StickerPack } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigString, DiscordRole } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Role } from '../../transformers/role.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FileContent, WithReason } from '@discordeno/types'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AtLeastOne, WithReason } from '@discordeno/types'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RestManager } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DiscordSticker } from '@discordeno/types'
|
||||
import { Collection } from '@discordeno/utils'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DiscordSticker } from '@discordeno/types'
|
||||
import { RestManager } from '../../restManager.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Sticker } from '../../transformers/sticker.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { DiscordWebhook } from '@discordeno/types'
|
||||
import { BigString, DiscordWebhook, WithReason } from '@discordeno/types'
|
||||
import { urlToBase64 } from '@discordeno/utils'
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Webhook } from '../../transformers/webhook.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { DiscordWebhook } from '@discordeno/types'
|
||||
import { BigString, WithReason } from '../../index.js'
|
||||
import { BigString, DiscordWebhook, WithReason } from '@discordeno/types'
|
||||
import type { RestManager } from '../../restManager.js'
|
||||
import { Webhook } from '../../transformers/webhook.js'
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
export * from '@discordeno/types'
|
||||
export * from '@discordeno/utils'
|
||||
export * from './checkRateLimits.js'
|
||||
export * from './cleanupQueues.js'
|
||||
export * from './convertRestError.js'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DiscordComponent } from '@discordeno/types'
|
||||
import {
|
||||
ButtonStyles,
|
||||
DiscordComponent,
|
||||
MessageComponentTypes,
|
||||
SelectOption,
|
||||
TextStyles
|
||||
} from '../index.js'
|
||||
} from '@discordeno/types'
|
||||
import type { RestManager } from '../restManager.js'
|
||||
|
||||
export function transformComponent (
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
AllowedMentions,
|
||||
DiscordAllowedMentions,
|
||||
RestManager
|
||||
} from '../../index.js'
|
||||
import { AllowedMentions, DiscordAllowedMentions } from '@discordeno/types'
|
||||
import type { RestManager } from '../../restManager'
|
||||
|
||||
export function transformAllowedMentionsToDiscordAllowedMentions (
|
||||
rest: RestManager,
|
||||
|
||||
@@ -1460,11 +1460,11 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "discordeno@workspace:packages/discordeno"
|
||||
dependencies:
|
||||
"@discordeno/bot": 18.0.0-alpha.1
|
||||
"@discordeno/client": 18.0.0-alpha.1
|
||||
"@discordeno/gateway": 18.0.0-alpha.1
|
||||
"@discordeno/rest": 18.0.0-alpha.1
|
||||
"@discordeno/types": 18.0.0-alpha.1
|
||||
"@discordeno/utils": 18.0.0-alpha.1
|
||||
"@swc/cli": ^0.1.57
|
||||
"@swc/core": ^1.3.21
|
||||
"@types/chai": ^4
|
||||
|
||||
Reference in New Issue
Block a user