minefort v5.0.0
Table of Contents
- Table of Contents
- Notice of Non-Affiliation and Disclaimer
- Affiliate link
- Installation
- Loading the module
- Example usage
- TypeScript
- Team
Notice of Non-Affiliation and Disclaimer
We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Minefort.com, or any of its subsidiaries or its affiliates. The official Minefort.com website can be found at https://minefort.com/.
Affiliate link
You can support this open source project by using the following affiliate link.
Installation
You can use any package manager you want, but we recommend using yarn
.
npm install minefort
yarn add minefort
pnpm add minefort
Loading the module
ES Modules (ESM)
import { Client } from "minefort";
CommonJS
const { Client } = require("minefort");
Example usage
Simple example to get all of your servers
Create and authenticate a client, and get all of your servers.
const { Client } = require("minefort");
const client = new Client();
(async () => {
await client.auth("username", "password");
/**
* Note:
* You can also just use your session token to authenticate
* like this: `client.sessionToken = "sessionToken";`
*/
const servers = await client.servers.getMyServers();
console.log(servers);
})();
Avoiding conflicts
Importing another module with the same name will cause conflicts (eg. discord.js
). This can simply be avoided by renaming the import.
import { Client as Minefort } from "minefort";
// Using CommonJS: "const { Client: Minefort } = require("minefort")"
import { Client } from "discord.js";
// minefort client
const minefort = new Minefort();
// discord.js client
const client = new Client();
TypeScript
Types are bundled with minefort
, so you do not need to install any additional packages.
Team
Mullp |
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago