Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MoonlightClientOptions

example

{ ..., prefix: ['p.', 'p!'], displayErrors: false, readyMessage: (client) => Logged in as ${client.user.tag} }, fetchGuildPrefix: guild => getPrefix(guild.id)

Hierarchy

  • ClientOptions
    • MoonlightClientOptions

Index

Properties

Optional allowedMentions

allowedMentions: MessageMentionOptions

Optional disableMentions

disableMentions: "none" | "all" | "everyone"

Optional displayErrors

displayErrors: undefined | false | true

Whether or not to display error messages sent by the error event

Optional fetchAllMembers

fetchAllMembers: undefined | false | true

Optional http

http: HTTPOptions

Optional messageCacheLifetime

messageCacheLifetime: undefined | number

Optional messageCacheMaxSize

messageCacheMaxSize: undefined | number

Optional messageEditHistoryMaxSize

messageEditHistoryMaxSize: undefined | number

Optional messageSweepInterval

messageSweepInterval: undefined | number

Optional owners

owners: string[]

An array that contains the ID's of the owners

Optional partials

partials: PartialTypes[]

Optional prefix

prefix: string | string[]

The prefix or an array of prefixes the bot will use

Optional presence

presence: PresenceData

Optional restRequestTimeout

restRequestTimeout: undefined | number

Optional restSweepInterval

restSweepInterval: undefined | number

Optional restTimeOffset

restTimeOffset: undefined | number

Optional restWsBridgeTimeout

restWsBridgeTimeout: undefined | number

Optional retryLimit

retryLimit: undefined | number

Optional shardCount

shardCount: undefined | number

Optional shards

shards: number | number[] | "auto"

Optional useMentionPrefix

useMentionPrefix: undefined | false | true

Whether or not to use mention prefix

Optional useSweeper

useSweeper: undefined | false | true

Whether or not to use the built-in memory sweeper

Optional useUsernamePrefix

useUsernamePrefix: undefined | false | true

Whether or not to use username prefix - e.g. if the bot is called "Sensei" then the username prefix will be "Sensei, "

Optional ws

ws: WebSocketOptions

Methods

Optional fetchGuildPrefix

  • fetchGuildPrefix(guild: Guild): string | Promise<string>
  • The function the framework will use to fetch a prefix for a guild

    example

    fetchGuildPrefix: async (guild) => { const prefix = await fetchPrefix(guild.id); return prefix; }

    Parameters

    • guild: Guild

    Returns string | Promise<string>

Optional readyMessage

Generated using TypeDoc