How to use enmap - 5 common examples

To help you get started, we’ve selected a few enmap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github callmekory / nezuko / src / core / managers / CommandManager.ts View on Github external
constructor(client: NezukoClient) {
    this.client = client
    this.Log = client.Log
    this.commands = new Enmap()
    this.aliases = new Enmap()
    this.prefix = client.config.prefix
    this.ownerID = client.config.ownerID

    this.loadCommands()

    if (!this.client || !(this.client instanceof NezukoClient)) {
      throw new Error('Discord Client is required')
    }
  }
github callmekory / nezuko / src / core / managers / SubprocessManager.ts View on Github external
constructor(client: NezukoClient) {
    this.client = client
    this.processes = new Enmap()

    if (!this.client || !(this.client instanceof NezukoClient)) {
      throw new Error('Discord Client is required')
    }
  }
github callmekory / nezuko / src / core / managers / CommandManager.ts View on Github external
public reloadCommands() {
    this.Log.warn('Reload Manager', 'Clearing Module Cache')
    this.commands = new Enmap()
    this.aliases = new Enmap()
    this.Log.warn('Reload Manager', 'Reinitialising Modules')
    this.loadCommands(`${__dirname}/../commands`)
    this.Log.ok('Reload Manager', 'Reload Commands Success')
    return true
  }
github callmekory / nezuko / src / core / managers / CommandManager.ts View on Github external
constructor(client: NezukoClient) {
    this.client = client
    this.Log = client.Log
    this.commands = new Enmap()
    this.aliases = new Enmap()
    this.prefix = client.config.prefix
    this.ownerID = client.config.ownerID

    this.loadCommands()

    if (!this.client || !(this.client instanceof NezukoClient)) {
      throw new Error('Discord Client is required')
    }
  }
github callmekory / nezuko / src / core / managers / CommandManager.ts View on Github external
public reloadCommands() {
    this.Log.warn('Reload Manager', 'Clearing Module Cache')
    this.commands = new Enmap()
    this.aliases = new Enmap()
    this.Log.warn('Reload Manager', 'Reinitialising Modules')
    this.loadCommands(`${__dirname}/../commands`)
    this.Log.ok('Reload Manager', 'Reload Commands Success')
    return true
  }

enmap

A simple database wrapper to make sqlite database interactions much easier for beginners, with additional array helper methods.

Apache-2.0
Latest version published 1 month ago

Package Health Score

71 / 100
Full package analysis

Popular enmap functions