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

x/harmony/src/client/mod.ts>ClientOptions

An easy to use Discord API Library for Deno.
Go to Latest
interface ClientOptions
import { type ClientOptions } from "https://deno.land/x/harmony@v2.6.0/src/client/mod.ts";

Some Client Options to modify behaviour

Properties

optional
id: string

ID of the Client/Application to initialize Slash Client REST

optional
token: string

Token of the Bot/User

optional
intents: Array<GatewayIntents | keyof GatewayIntents>

Gateway Intents

optional
cache: ICacheAdapter

Cache Adapter to use, defaults to Collections one

optional
forceNewSession: boolean

Force New Session and don't use cached Session (by persistent caching)

Startup presence of client

optional
canary: boolean

Force all requests to Canary API

optional
messageCacheLifetime: number

Time till which Messages are to be cached, in MS. Default is 3600000

optional
reactionCacheLifetime: number

Time till which Message Reactions are to be cached, in MS. Default is 3600000

optional
fetchUncachedReactions: boolean

Whether to fetch Uncached Message of Reaction or not?

optional
clientProperties: ClientProperties

Client Properties

optional
enableSlash: boolean

Enable/Disable Slash Commands Integration (enabled by default)

optional
disableEnvToken: boolean

Disable taking token from env if not provided (token is taken from env if present by default)

optional
restOptions: RESTOptions

Override REST Options

optional
fetchGatewayInfo: boolean

Whether to fetch Gateway info or not

optional
shard: number

ADVANCED: Shard ID to launch on

optional
shardCount: number | "auto"

ADVANCED: Shard count.

optional
compress: boolean

Whether to enable Zlib Compression (for Gateway) or not (enabled by default)

optional
messageCacheMax: number

Max number of messages to cache per channel. Default 100