$exec
Allows you to execute console commands from your bot. This is just like executing a command from your host's console, without having to go to the console!

FUNCTION USAGE

  • $exec[command]

Properties:

command - Define a console command to execute.
NOTE: Can be very dangerous for your bot, host and/or computer if you do not know what you are executing. Be very careful!
Some small errors will show up in the Discord channel but most will be returned to the console.

Example 1: To easily execute a console command in the Discord channel.

1
bot.Command({
2
name: "exec",
3
code: `
4
$exec[$message[]]
5
`
6
})
Copied!

Example 2: Executing this will reboot your bot. Just make sure the file name below matches your main bot file

1
bot.Command({
2
name: "reboot",
3
code: `
4
$exec[node index.js]
5
`
6
})
Copied!

Example 3: Executing this will install the latest version of DB-Script :)

1
bot.Command({
2
name: "update-npm",
3
code: `
4
$exec[npm i discordbot-script]
5
`
6
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: