Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils

Index

References

ComponentActionRow

Re-exports ComponentActionRow

ComponentButton

Re-exports ComponentButton

ComponentData

Re-exports ComponentData

ComponentEmojiData

Re-exports ComponentEmojiData

ComponentSelectMenu

Re-exports ComponentSelectMenu

ComponentSelectMenuOption

Re-exports ComponentSelectMenuOption

ComponentSelectMenuOptionData

Re-exports ComponentSelectMenuOptionData

Embed

Re-exports Embed

EmbedAuthor

Re-exports EmbedAuthor

EmbedField

Re-exports EmbedField

EmbedFooter

Re-exports EmbedFooter

EmbedImage

Re-exports EmbedImage

EmbedProvider

Re-exports EmbedProvider

EmbedThumbnail

Re-exports EmbedThumbnail

EmbedVideo

Re-exports EmbedVideo

Markup

Renames and exports utils/markup

PermissionTools

Renames and exports utils/permissions

Type aliases

Omit

Omit<T, K>: Pick<T, Exclude<keyof T, K>>

Type parameters

  • T

  • K: keyof T

PartialBy

PartialBy<T, K>: Omit<T, K> & Partial<Pick<T, K>>

Type parameters

  • T

  • K: keyof T

UrlQuery

UrlQuery: {}

Type declaration

  • [key: string]: any

Functions

addQuery

  • addQuery(url: string, query?: UrlQuery): string

anyToCamelCase

  • anyToCamelCase(object: any, skip?: string[]): any

getAcronym

  • getAcronym(name?: string): string

getFiles

  • getFiles(directory: string, subdirectories?: boolean): Promise<string[]>
  • Parameters

    • directory: string
    • Optional subdirectories: boolean

    Returns Promise<string[]>

getFirstArgument

  • getFirstArgument(value: string): [string, string]

getFormatFromHash

  • getFormatFromHash(hash: string, format?: null | string, defaultFormat?: string): string
  • Parameters

    • hash: string
    • Optional format: null | string
    • defaultFormat: string = ...

    Returns string

guildIdToShardId

  • guildIdToShardId(guildId: string, shardCount?: number): number
  • Parameters

    • guildId: string
    • Optional shardCount: number

    Returns number

hexToInt

  • hexToInt(hex: string): number

intToHex

  • intToHex(int: number, hashtag?: boolean): string

intToRGB

  • intToRGB(int: number): { b: number; g: number; r: number }
  • Parameters

    • int: number

    Returns { b: number; g: number; r: number }

    • b: number
    • g: number
    • r: number

regex

rgbToInt

  • rgbToInt(r: number, g: number, b: number): number

toCamelCase

  • toCamelCase(value: string): string

Generated using TypeDoc