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

x/harmony/mod.ts

An easy to use Discord API Library for Deno.
Go to Latest
import * as harmony from "https://deno.land/x/harmony@v2.8.0/mod.ts";

Classes

Manages Slash Commands, allows fetching/modifying/deleting/creating Slash Commands.

Child Managers validate data from their parents i.e. from Managers

Managers handle caching data. And also some REST Methods as required.

Bit Field utility to work with Bits and Flags

TSX compiles down to BotUI.createElement

Harmony Client. Provides high-level interface over the REST and WebSocket API.

Enhanced Map with various utility functions

Harmony Client with extended functionality for Message based Commands parsing and handling.

Message Embed Object

Guild Emoji Object

Customizable, isolated and pluggable Extensions are a great way of writing certain Modules independent of others

Extension Commands Manager

Extensions Manager for CommandClient

Handles Discord Gateway connection.

Cache Manager used for Caching values related to Gateway connection

Represents a Text Channel but in a Guild

Utility class for handling Gateway Intents

Represents a base Interaction.

Represents a Channel Object for an Option in Slash Command

Slash Client represents an Interactions Client which can be used without Harmony Client.

Message Attachment that can be sent while Creating Message

Represents permissions BitField

Redis Cache Adapter for using Redis as a cache-provider.

An easier to use interface for interacting with Discord REST API.

Represents a Guild Role

Slash Command Builder

Slash Client represents an Interactions Client which can be used without Harmony Client.

Manages Slash Commands, allows fetching/modifying/deleting/creating Slash Commands.

Utility class to extract data from a Snowflake (Discord ID)

Channel object for Text Channel type

Webhook follows different way of instantiation

Variables

API Route builder function

Get appropriate Channel structure by its type

Function to get Image URL from a resource on Discord CDN

Functions

Represents a row containing other components. All components must go inside Action Rows.

Decorator to add a autocomplete interaction handler.

A button component

Command decorator. Decorates the function with optional metadata as a Command registered upon constructing class.

Cusomizable command validation.

Event decorator to create an Event handler from function

Fragment is like the root component which converts TSX elements into Component Payload

Decorator to create a Grouped Sub-Command Command handler for a Slash Command.

The command can only be called if the bot is currently in a voice channel. GatewayIntents.GUILD_VOICE_STATES needs to be set.

The command can only be called from a guild.

The command can only be called if the user is currently in a voice channel. GatewayIntents.GUILD_VOICE_STATES needs to be set.

Decorator to create a Message Context Menu Command handler.

An option or choice for Select Component

Select (drop down) component. Allows user to choose one or more options

Decorator to create a Slash Command handler.

Sub Command decorator. Decorates the function with optional metadata as a Sub Command registered upon constructing class.

Decorator to create a Sub-Command Command handler for a Slash Command.

Decorator to create a User Context Menu Command handler.

Interfaces

Represents the Slash Command (Application Command) payload sent for creating/[bulk] editing.

Represents a fully qualified Application Command payload.

info If new_value is not present in the change object, while old_value is, that means the property that was changed has been reset, or set to null

Some Client Options to modify behaviour

OS related properties sent with Gateway Identify

Command Client options extending Client Options to provide a lot of Commands-related customizations

ICacheAdapter is the interface to be implemented by Cache Adapters for them to be usable with Harmony.

Interaction Message related Options

Represents the Slash Command (Application Command) payload sent for creating/[bulk] editing.

Represents a fully qualified Application Command payload.

Options for InteractionsClient