mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-30 10:56:55 -05:00
22 lines
640 B
JavaScript
22 lines
640 B
JavaScript
/* eslint-disable max-len */
|
|
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.cache.some((role) => role.name === 'Trusted')) {
|
|
bot.end('end command');
|
|
} else {
|
|
throw new Error('You\'re not in the trusted role!');
|
|
}
|
|
},
|
|
};
|