owobot/plugins/commands/eval.js

18 lines
592 B
JavaScript
Raw Normal View History

2024-07-18 16:55:23 -04:00
const textformat=require("../../util/textformat.js")
const index=require("../../index.js") //Not used in the code, but may be used by users of the command
module.exports={
execute: (c)=>{
if(c.type!="console"){
2024-07-19 11:36:16 -04:00
c.reply(textformat("Eval command is currently not available to players in Minecraft due to security issues."))
2024-07-18 16:55:23 -04:00
};
try{
console.log(eval(c.args.join(" ")));
}catch(e){
console.error(e);
}
},
desc: "Run JavaScript code", // Command description
usage: '', // Command usage
hidden: true
}