chalda / DiscordBot

A chat bot for discord app based off discord.js
GNU General Public License v2.0
583 stars 355 forks source link

adds eval/exec commands with JS VMs #199

Closed chalda closed 3 years ago

Einarin commented 3 years ago

Note that this js, when executed with !exec, crashes the bot right now due to generating a discord message longer than the maximum legal message. Adding the ability to have external effects definitely makes this command dangerous, though it should be slightly safer than the previous eval since hopefully it can't erase your hard drive now at least. Definitely still a dangerous command though.

require("request-promise")("https://raw.githubusercontent.com/cbracco/html5-test-page/master/index.html").then((response) => { msg.channel.send(response);})

I have yet to find a way to crash the bot with the new !eval, but I think it's probably a good idea to keep it as dangerous too since I can't prove there isn't a way...