Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/denocordts/src/types/mod.ts

An Object Oriented Discord API wrapper for Deno.
Latest
import * as denocordts from "https://deno.land/x/denocordts@1.2.0/src/types/mod.ts";

String formatters and utilities for dealing with ANSI color codes.

This module is browser compatible.

import { bgBlue, red, bold } from "https://deno.land/std@0.224.0/fmt/colors.ts";
console.log(bgBlue(red(bold("Hello world!"))));

This module supports NO_COLOR environmental variable disabling any coloring if NO_COLOR is set.

Classes

A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has an ID, for significantly improved performance and ease-of-use.

The event emitter.

The event emitter.

Enums

E
EmbedType
deprecated

Functions

Set background color to black.

Set background color to blue.

Set background color to bright black.

Set background color to bright blue.

Set background color to bright cyan.

Set background color to bright green.

Set background color to bright magenta.

Set background color to bright red.

Set background color to bright white.

Set background color to bright yellow.

Set background color to cyan.

Set background color to green.

Set background color to magenta.

Set background color to red.

Set background color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set background color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Set background color to white.

Set background color to yellow.

Set text color to black.

Set text color to blue.

Make the text bold.

Set text color to bright black.

Set text color to bright blue.

Set text color to bright cyan.

Set text color to bright green.

Set text color to bright magenta.

Set text color to bright red.

Set text color to bright white.

Set text color to bright yellow.

Set background color to black.

Set background color to blue.

Set background color to bright black.

Set background color to bright blue.

Set background color to bright cyan.

Set background color to bright green.

Set background color to bright magenta.

Set background color to bright red.

Set background color to bright white.

Set background color to bright yellow.

Set background color to cyan.

Set background color to green.

Set background color to magenta.

Set background color to red.

Set background color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set background color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Set background color to white.

Set background color to yellow.

Set text color to black.

Set text color to blue.

Make the text bold.

Set text color to bright black.

Set text color to bright blue.

Set text color to bright cyan.

Set text color to bright green.

Set text color to bright magenta.

Set text color to bright red.

Set text color to bright white.

Set text color to bright yellow.

Set text color to cyan.

The text emits only a small amount of light.

Get whether text color change is enabled or disabled.

Set text color to gray.

Set text color to green.

Make the text hidden.

Invert background color and text color.

Make the text italic.

Set text color to magenta.

Set text color to red.

Reset the text modified

Set text color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set text color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Set changing text color to enabled or disabled

Put horizontal line through the center of the text.

Remove ANSI escape codes from the string.

Make the text underline.

Set text color to white.

Set text color to yellow.

Set text color to cyan.

The text emits only a small amount of light.

Get whether text color change is enabled or disabled.

Set text color to gray.

Set text color to green.

Make the text hidden.

Invert background color and text color.

Make the text italic.

Set text color to magenta.

Set text color to red.

Reset the text modified

Set text color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set text color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Set changing text color to enabled or disabled

Put horizontal line through the center of the text.

Remove ANSI escape codes from the string.

Make the text underline.

A type-guard check for DM application command interactions

A type-guard check for guild application command interactions

A type-guard check for chat input application commands.

A type-guard check for context menu application commands.

A type-guard check for DM interactions

A type-guard check for guild interactions

A type-guard check for buttons that have a custom_id attached to them.

A type-guard check for buttons that have a url attached to them.

A type-guard check for button message component interactions

A type-guard check for DM message component interactions

A type-guard check for guild message component interactions

A type-guard check for message component interactions

A type-guard check for select menu message component interactions

Set text color to white.

Set text color to yellow.

Interfaces

This interface is used to allow easy extension for other channel types. While also allowing APIPartialChannel to be used without breaking.

Not documented, but partial only includes id, name, and type

Not documented but mentioned

Type Aliases

Returned when new role(s) are added

Returned when role(s) are removed

Returned when a guild's afk_channel_id is changed

Returned when a guild's afk_timeout is changed

Returned when an overwrite's allowed permissions bitfield is changed

The application ID of the added or removed Webhook or Bot

Empty string

Returned when a sticker's availability is changed

Returned when a user's avatar_hash is changed

Returned when a guild's banner hash is changed

Returned when a voice channel's bitrate is changed

Returned when an invite's or guild scheduled event's channel_id is changed

Returned when an invite's code is changed

Returned when a role's color is changed

Returned when a user's timeout is changed

Returned when a user's deaf status is changed

Returned when a guild's default_message_notifications is changed

Returned when an overwrite's denied permissions bitfield is changed

Returned when a guild's or sticker's or guild scheduled event's description is changed

Returned when a guild's discovery splash is changed

Returned when an integration's enable_emoticons is changed

Returned when entity type of a guild scheduled event is changed

Returned when an integration's expire_behavior is changed

Returned when an integration's expire_grace_period is changed

Returned when a guild's explicit_content_filter is changed

Returned when a sticker's format_type is changed

Returned when a sticker's guild_id is changed

Returned when a role's hoist status is changed

Returned when a guild's icon is changed

The ID of the changed entity - sometimes used in conjunction with other keys

Returned when a guild's scheduled event's cover image is changed

Returned when an invite's inviter_id is changed

Returned when location of a guild scheduled event is changed

Returned when an invite's max_age is changed

Returned when an invite's max_uses is changed

Returned when a role's mentionable status is changed

Returned when a guild's mfa_level is changed

Returned when a user's mute status is changed

Returned when an entity's name is changed

Returned when a user's nick is changed

Returned when a channel's NSFW restriction is changed

Returned when a guild's owner_id is changed

Returned when a channel's permission overwrites is changed

Returned when a permission bitfield is changed

Returned when a channel's position is changed

Returned when a guild's preferred_locale is changed

Returned when privacy level of a stage instance or guild scheduled event is changed

Returned when there is a change in number of days after which inactive and role-unassigned members are kicked

Returned when a guild's public_updates_channel_id is changed

Returned when a channel's amount of seconds a user has to wait before sending another message is changed

Returned when a guild's region is changed

Returned when a guild's rules_channel_id is changed

Represents a change where the key is a snowflake. Currently, the only known instance of this is returned when permissions for a command were updated ()

Returned when a guild's splash is changed

Returned when status of a guild scheduled event is changed

Returned when a guild's system_channel_id is changed

Returned when a sticker's related emoji is changed

Returned when an invite's temporary status is changed

Returned when a channel's topic is changed

The type of entity created

Returned when a voice channel's user_limit is changed

Returned when an invite's uses is changed

Returned when a guild's vanity_url_code is changed

Returned when a guild's verification_level is changed

Returned when a guild's widget_channel_id is changed

Returned when a guild's widget is enabled

Note: while the return type is ArrayBuffer, the expected result is a buffer of sorts (depends if in browser or on node.js/deno).

Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives the wait query parameter set to true

Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives the wait query parameter set to true

Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives the wait query parameter set to true