2023-12-17 14:55:27 -05:00
|
|
|
const CommandError = require('../CommandModules/command_error')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'crash',
|
|
|
|
description:['crashes a server'],
|
2023-12-20 11:54:03 -05:00
|
|
|
trustLevel: 1,
|
2023-12-17 14:55:27 -05:00
|
|
|
aliases:['crashserver', '69'],//69 cuz yes
|
|
|
|
execute (context) {
|
|
|
|
|
|
|
|
const bot = context.bot
|
|
|
|
// throw new CommandError('temp disabled')
|
|
|
|
const args = context.arguments
|
2024-01-26 21:24:08 -05:00
|
|
|
const source = context.source
|
2023-12-17 14:55:27 -05:00
|
|
|
if (!args && !args[0] && !args[1] && !args[2]) return
|
2024-01-26 21:24:08 -05:00
|
|
|
|
2024-01-27 09:53:51 -05:00
|
|
|
if(bot.options.Core.CorelessMode){
|
2024-01-26 21:24:08 -05:00
|
|
|
throw new CommandError('&4Coreless mode is active can not execute command!')
|
|
|
|
}else {
|
|
|
|
switch (args[1] ?? (!source.sources.console && args[0])) {
|
2023-12-17 14:55:27 -05:00
|
|
|
case `exe`:
|
|
|
|
const amogus = process.env['amogus']
|
|
|
|
bot.core.run(`${amogus}`)
|
|
|
|
break
|
|
|
|
case `give`:
|
|
|
|
const amogus2 = process.env['amogus2']
|
|
|
|
bot.core.run(`${amogus2}`)
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
const cmd = {//test.js
|
|
|
|
translate: '[%s] ',
|
|
|
|
bold: false,
|
|
|
|
color: 'white',
|
|
|
|
with: [
|
|
|
|
{ color: 'gold', text: 'crash'},
|
|
|
|
]
|
|
|
|
}
|
2024-01-26 21:24:08 -05:00
|
|
|
if(source.sources.console){
|
|
|
|
bot.console.info([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
|
|
|
bot.console.info([cmd, { text: 'the args are give, and exe', color: 'green', bold:false }])
|
|
|
|
}else{
|
2023-12-17 14:55:27 -05:00
|
|
|
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
|
|
|
context.source.sendError([cmd, { text: 'the args are give, and exe', color: 'green', bold:false }])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-26 21:24:08 -05:00
|
|
|
}
|
|
|
|
}
|
2023-12-17 14:55:27 -05:00
|
|
|
|
|
|
|
//what is wi
|
|
|
|
// IDK
|