Skip to content

$writeFile

$writeFile will create a new file in the bot’s directory.

Usage

$writeFile[path;text;encoding?]

Parameters

FieldTypeDescriptionRequired
pathstringWhere to create the file.true
textstringWhat the content of the file should be.true
encodingstringText/File encoding.false

Example(s)

This will create a file called “testing.txt” with the content of “Hello!“:

1
client.command({
2
name: "writeFile",
3
code: `
4
$writeFile[./testing.txt;Hello!;utf8]
5
`
6
});