Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bot

The bot is the main operator of the API. It handles the events, and properties for all structures.

Hierarchy

  • Bot

Index

Constructors

constructor

Properties

Readonly api

api: BotAPI

Creates all outgoing API requests

channels

The bot's channels controller

commands

commands: CommandsHandler

Responsible for handling all of the Bot's commands

communication

communication: BotCommunication

Responsible for the communication between shards created by BotShardManager

connection

connection: BotConnection

Responsible for managing the bot connection to the Discord gateway

emojis

Collection of all GuildEmojis found in all guilds the Bot is part of

events

Responsible for handling all of the Bot's events

guilds

The bot's guilds controller

Readonly options

options: BotOptions

Options used to determine how the Bot operates

Readonly shardOptions

shardOptions: ShardOptions

ShardOptions object containing sharding information

unavailableGuilds

Collection of all GuildUnavailables associated to the Bot

user

user: BotUser | undefined

This bot's Discord user Initializes right before the Bot READY event

users

The bot's users controller

Methods

connect

  • connect(): Promise<void>
  • Connects the bot to the Discord gateway

    Returns Promise<void>

debug

  • debug(...messages: unknown[]): void
  • Sends debug messages to the BotEvent.Debug event

    example
    bot.on(BotEvents.Debug, console.log);
    
    bot.debug('Hello World!'); // 'Hello World'

    @param {...unknown[]} messages The debug messages

    Parameters

    • Rest ...messages: unknown[]

    Returns void

Generated using TypeDoc