/* eslint-disable max-len */ const config = require('../config'); module.exports = { name: 'end', alias: [], description: 'Ends the bot\'s client', usage: '', 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!'); } }, };