libcord
Enumerations
- ActivityTypes
- ApplicationCommandOptionTypes
- ApplicationCommandOptionsTypes
- ApplicationCommandType
- CLIENT_EVENTS
- ChannelTypes
- Colors
- Intents
- Permissions
Other Classes
- ActionRow
- ApplicationCommand
- Button
- CategoryChannel
- Channel
- Client
- Collection
- Color
- Embed
- GroupChannel
- GuildChannel
- Interaction
- NewsChannel
- NewsThread
- PermissionOverwrite
- PrivateChannel
- PrivateThread
- PublicThread
- Role
- SelectMenu
- StageChannel
- TextChannel
- Thread
- VoiceChannel
- Webhook
Structures Classes
- Base
- ClientUser
- CommandInteraction
- Guild
- Member
- Message
- MessageContextMenuInteraction
- User
- UserContextMenuInteraction
Interfaces
- Activity
- ApplicationCommandBase
- ApplicationCommandOption
- ApplicationCommandOptionChoice
- ApplicationCommandOptionWithSubCommand
- AuthorOptions
- ChannelCreateOptions
- ChannelEditOptions
- ClientOptions
- EditApplicationCommandOptions
- FileOption
- FooterOptions
- GatewayConnectData
- ImageOptions
- ImageUrlOptions
- InteractionOptions
- MessageMention
- MessageOptions
- Presence
- RoleCreateOptions
- RoleEditOptions
- SelectMenuOption
- ThumbnailOptions
- WebhookOptions
- executeWebhookOptions
Type Aliases
ActivityType
Ƭ ActivityType: keyof typeof ActivityTypes
Defined in
packages/libcord/src/structures/User.ts:146
ApplicationCommandOptionsType
Ƭ ApplicationCommandOptionsType: keyof typeof ApplicationCommandOptionsTypes
Defined in
packages/libcord/src/structures/ApplicationCommand.ts:119
ColorStrings
Ƭ ColorStrings: "LINK"
| "PRIMARY"
| "SECONDARY"
| "SUCCESS"
| "DANGER"
Defined in
packages/libcord/src/utils/Utils.ts:23
ComponentsType
Ƭ ComponentsType: Button
| SelectMenu
| APIMessageComponent
| ActionRow
Defined in
packages/libcord/src/structures/components/ActionRow.ts:4
Permission
Ƭ Permission: keyof typeof Permissions
Defined in
packages/libcord/src/utils/Permissions.ts:148
PresenceStatus
Ƭ PresenceStatus: "online"
| "dnd"
| "idle"
| "invisible"
| "offline"
Defined in
packages/libcord/src/structures/User.ts:171
RGB
Ƭ RGB: [number
, number
, number
]
Defined in
packages/libcord/src/utils/Color.ts:1
Snowflake
Ƭ Snowflake: string
Defined in
packages/libcord/src/utils/Snowflake.ts:1
imageFormats
Ƭ imageFormats: "jpg"
| "png"
| "webp"
| "gif"
Defined in
packages/libcord/src/utils/Utils.ts:3
imageSize
Ƭ imageSize: 16
| 32
| 64
| 128
| 256
| 512
| 1024
| 2048
| 4096
Defined in
packages/libcord/src/utils/Utils.ts:4
Variables
API_VERSION
• Const
API_VERSION: number
= 9
Defined in
packages/libcord/src/Constants.ts:171
Functions
ParseColor
▸ ParseColor(color
): ButtonStyle
Parameters
Name | Type |
---|---|
color | ButtonStyle | ColorStrings |
Returns
ButtonStyle
Defined in
packages/libcord/src/utils/Utils.ts:44
addPermission
▸ addPermission(permissions
, permission
): number
Parameters
Name | Type |
---|---|
permissions | number |
permission | "CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILDS" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_EMOJIS" | "USE_SLASH_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_THREADS" | "USE_PUBLIC_THREADS" | "USE_PRIVATE_THREADS" |
Returns
number
Defined in
packages/libcord/src/utils/Permissions.ts:157
getAllPermissions
▸ getAllPermissions(permissions
): Permission
[]
Parameters
Name | Type |
---|---|
permissions | number |
Returns
Defined in
packages/libcord/src/utils/Permissions.ts:173
getDate
▸ getDate(snowflake
): number
Parameters
Name | Type |
---|---|
snowflake | string |
Returns
number
Defined in
packages/libcord/src/utils/Snowflake.ts:3
hasPermission
▸ hasPermission(permissions
, permission
): boolean
Parameters
Name | Type |
---|---|
permissions | number |
permission | "CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILDS" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_EMOJIS" | "USE_SLASH_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_THREADS" | "USE_PUBLIC_THREADS" | "USE_PRIVATE_THREADS" |
Returns
boolean
Defined in
packages/libcord/src/utils/Permissions.ts:150
parseEmoji
▸ parseEmoji(text
): null
| { animated
: boolean
= false; id
: null
= null; name
: string
= text } | { animated
: boolean
; id
: string
; name
: string
}
Parameters
Name | Type |
---|---|
text | string |
Returns
null
| { animated
: boolean
= false; id
: null
= null; name
: string
= text } | { animated
: boolean
; id
: string
; name
: string
}
Defined in
packages/libcord/src/utils/Utils.ts:32
removePermission
▸ removePermission(permissions
, permission
): number
Parameters
Name | Type |
---|---|
permissions | number |
permission | "CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILDS" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_EMOJIS" | "USE_SLASH_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_THREADS" | "USE_PUBLIC_THREADS" | "USE_PRIVATE_THREADS" |
Returns
number
Defined in
packages/libcord/src/utils/Permissions.ts:164
resolveApplicationCommandForApi
▸ resolveApplicationCommandForApi(cmd
): object
Parameters
Name | Type |
---|---|
cmd | Object |
Returns
object
Defined in
packages/libcord/src/structures/ApplicationCommand.ts:225
resolvePartialEmoji
▸ resolvePartialEmoji(emoji
): null
| { animated
: undefined
; id
: string
= emoji; name
: undefined
} | { animated
: boolean
; id
: any
; name
: any
}
Parameters
Name | Type |
---|---|
emoji | any |
Returns
null
| { animated
: undefined
; id
: string
= emoji; name
: undefined
} | { animated
: boolean
; id
: any
; name
: any
}
Defined in
packages/libcord/src/utils/Utils.ts:69
warn
▸ warn(error
): void
Parameters
Name | Type |
---|---|
error | Error |
Returns
void
Defined in
packages/libcord/src/Client.ts:851
Events
connected
▸ connected(): void
when bot are connected to websocket
As Member Of
Client Client#connected
Returns
void
Defined in
packages/libcord/src/Client.ts:841
error
▸ error(error
): void
when the websocket connection have a error
As Member Of
Client Client#error
Parameters
Name | Type | Description |
---|---|---|
error | Error | the error |
Returns
void
Defined in
packages/libcord/src/Client.ts:849
rawWS
▸ rawWS(packet
): void
when bot receive a Websocket event
As Member Of
Client Client#rawWS
Parameters
Name | Type | Description |
---|---|---|
packet | rawWSEvent | a object of ws packets |
Returns
void
Defined in
packages/libcord/src/Client.ts:834
ready
▸ ready(): void
when bot are online
As Member Of
Client Client#ready
Returns
void