chore: add type and utils export

This commit is contained in:
H01001000
2022-12-01 18:42:02 +08:00
parent 1d935f2ae2
commit 6843b20ba1
4 changed files with 6 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
export * from '@discordeno/types'
export * from '@discordeno/utils'
export * from './bot.js'
export * from './transformers/index.js'
export * from './types.js'

View File

@@ -1,14 +1,5 @@
import { ImageFormat, ImageSize } from '../helpers/members/getAvatarUrl.js'
/** Pause the execution for a given amount of milliseconds. */
export async function delay (ms: number): Promise<void> {
return await new Promise((res): number =>
setTimeout((): void => {
res()
}, ms)
)
}
/** Help format an image url. */
export function formatImageURL (url: string, size: ImageSize = 128, format?: ImageFormat) {
return `${url}.${format || (url.includes('/a_') ? 'gif' : 'jpg')}?size=${size}`

View File

@@ -1,3 +1,5 @@
export * from '@discordeno/types'
export * from '@discordeno/utils'
export * from './manager/index.js'
export * from './shard/index.js'
export * from './utils/index.js'

View File

@@ -1,3 +1,5 @@
export * from '@discordeno/types'
export * from '@discordeno/utils'
export * from './checkRateLimits.js'
export * from './cleanupQueues.js'
export * from './convertRestError.js'