Options
All
  • Public
  • Public/Protected
  • All
Menu

This class is used to keep the bots various properties separate from the discord.js Client class.

const bot = new BotClient(options)

Hierarchy

  • BotClient

Index

Constructors

  • new BotClient(options: ClientOptions): BotClient
  • Creates an instance of BotClient.

    Parameters

    • options: ClientOptions

      represents discord.js' ClientOptions

    Returns BotClient

Properties

aliases: Collection<string, string>
commands: Collection<string, Command>
events: Collection<string, Event>
logger: Logger
perms: Levels[]
subscriptions: Map<string, MusicManager>

Methods

  • dev(): void
  • Used to run some basic dev related logging, such as discord debugging

    if (process.env.NODE_ENV !== 'production') bot.dev();
    

    Returns void

  • init(token: string, sentry?: any, options?: null): void
  • This method is used to start the bots initialization process.

    • without sentry support.
      bot.init(String(process.env.TOKEN));
      
    • With sentry support.
      bot.init(String(process.env.TOKEN), Sentry);
      

    Parameters

    • token: string

      The bots token from discord.com

    • Optional sentry: any

      Send sentry through so it can be used by the bot

    • Optional options: null

      nothing for now maybe one day.

    Returns void