mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 23:57:57 -05:00
23 lines
663 B
JavaScript
23 lines
663 B
JavaScript
/* eslint-disable max-len */
|
|
const config = require('../config');
|
|
module.exports = {
|
|
name: 'end',
|
|
alias: [],
|
|
description: 'Ends the bot\'s client',
|
|
usage: '<hash>',
|
|
trusted: 1,
|
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
|
if (args[0]===bot.hash) {
|
|
bot.end('end command');
|
|
} else {
|
|
throw new Error('Invalid hash');
|
|
}
|
|
},
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
|
if (message.member._roles.at(0)===config.discord.trustedRoleID) {
|
|
bot.end('end command');
|
|
} else {
|
|
throw new Error('You\'re not in trusted role!');
|
|
}
|
|
},
|
|
};
|