Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • App

Implements

Index

Constructors

constructor

  • Create a new App, this is called whenever the server starts up and initiates the Apps. Note, your implementation of this class should call super(name, id, version) so we have it. Also, please use the initialize() method to do items instead of the constructor as the constructor might be called more than once but the initialize() will only be called once.

    Parameters

    Returns App

Methods

Protected extendConfiguration

getAccessors

getAppUserUsername

  • getAppUserUsername(): string
  • Gets the username of this App's app user.

    deprecated

    This method will be removed in the next major version. Please use read.getUserReader().getAppUser() instead.

    Returns string

    the username of the app user

getAuthorInfo

getDescription

  • getDescription(): string

getID

  • getID(): string

getInfo

getLogger

getName

  • getName(): string

getNameSlug

  • getNameSlug(): string

getRequiredApiVersion

  • getRequiredApiVersion(): string

getStatus

getVersion

  • getVersion(): string

initialize

  • Method which will be called when the App is initialized. This is the recommended place to add settings and slash commands. If an error is thrown, all commands will be unregistered.

    Parameters

    Returns Promise<void>

onDisable

  • Method which is called when this App is disabled and it can be called several times. If this App was enabled and then the user disabled it, this method will be called.

    Parameters

    Returns Promise<void>

onEnable

  • Method which is called when this App is enabled and can be called several times during this instance's life time. Once after the initialize() is called, pending it doesn't throw an error, and then anytime the App is enabled by the user. If this method, onEnable(), returns false, then this App will not actually be enabled (ex: a setting isn't configured).

    Parameters

    Returns Promise<boolean>

    whether the App should be enabled or not

onInstall

onPreSettingUpdate

  • Method which is called before a setting which belongs to this App is going to be updated by an external system and not this App itself. The setting passed is the newly updated one.

    Parameters

    Returns Promise<ISetting>

onSettingUpdated

  • Method which is called whenever a setting which belongs to this App has been updated by an external system and not this App itself. The setting passed is the newly updated one.

    Parameters

    Returns Promise<void>

onUninstall

Protected setStatus

  • setStatus(status: AppStatus): Promise<void>
  • Sets the status this App is now at, use only when 100% true (it's protected for a reason).

    Parameters

    • status: AppStatus

      the new status of this App

    Returns Promise<void>

Generated using TypeDoc