pterodactyl-manager
Version:
A powerful and easy-to-use API wrapper for Pterodactyl's API, providing a seamless integration of server management and user administration functionalities.
19 lines (12 loc) • 503 B
Markdown
# How to write a file on a server
```js
const { PteroManager } = require("./PteroManager.js")
const Ptero = new PteroManager(apiKey, url)
async function main() {
// Normal Files //
await Ptero.writeFile("Server name", "apiKey", "./path.txt", JSON.stringify("Hello !"))
// Compressed files
await Ptero.writeFile("Server name", "apiKey", "./path.zip", new FormData().append('zipFile', new Blob([require('fs').readFileSync('./path.zip')]), { filename: 'zipFile.zip' }))
};
main()
```