mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
chore: add type and utils export
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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}`
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export * from '@discordeno/types'
|
||||
export * from '@discordeno/utils'
|
||||
export * from './checkRateLimits.js'
|
||||
export * from './cleanupQueues.js'
|
||||
export * from './convertRestError.js'
|
||||
|
||||
Reference in New Issue
Block a user