2017-02-04 00:20:02 +00:00
|
|
|
const JanetModule = require('./janetmodule')
|
|
|
|
|
|
|
|
class Reload extends JanetModule {
|
|
|
|
|
|
|
|
constructor(client) {
|
|
|
|
super({
|
|
|
|
name: 'Reload',
|
|
|
|
showInHelp: false,
|
2017-02-05 19:16:10 +00:00
|
|
|
command: 'load',
|
2017-02-04 00:20:02 +00:00
|
|
|
methods: ['pm']
|
|
|
|
}, client)
|
|
|
|
}
|
|
|
|
|
|
|
|
respond(event, data) {
|
|
|
|
this.client.say("Just checking to see if I've got any new modules...")
|
|
|
|
this.client.clearModules();
|
|
|
|
this.client.loadModules();
|
|
|
|
this.client.say("I'm back now")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = (client) => {
|
|
|
|
return new Reload(client)
|
|
|
|
}
|