forked from Supositware/Haha-Yes
load command
This commit is contained in:
parent
0d94fa1471
commit
e66a772394
1 changed files with 33 additions and 0 deletions
33
commands/owner/load.js
Normal file
33
commands/owner/load.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
const { Command } = require('discord-akairo');
|
||||||
|
|
||||||
|
class loadCommand extends Command {
|
||||||
|
constructor() {
|
||||||
|
super('load', {
|
||||||
|
aliases: ['load'],
|
||||||
|
category: 'owner',
|
||||||
|
ownerOnly: 'true',
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
id: 'command',
|
||||||
|
type: 'string',
|
||||||
|
match: 'rest'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
description: {
|
||||||
|
content: 'load command',
|
||||||
|
usage: '[command]',
|
||||||
|
examples: ['utility/ping.js']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async exec(message, args) {
|
||||||
|
if (this.handler.load(`${__dirname}/../${args.command}`)) {
|
||||||
|
return message.channel.send(`Sucessfully loaded command ${args.command}`);
|
||||||
|
} else {
|
||||||
|
return message.channel.send(`Failed to load ${args.command}, did you point to the correct directory?`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = loadCommand;
|
Loading…
Reference in a new issue