Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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')
}
}
constructor(client: NezukoClient) {
this.client = client
this.processes = new Enmap()
if (!this.client || !(this.client instanceof NezukoClient)) {
throw new Error('Discord Client is required')
}
}
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
}
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')
}
}
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
}