naoko-leveling
Version:
A standard leveling system forgescript extension for discord bot
50 lines (44 loc) • 1.87 kB
Markdown
> A Standard leveling system for forgescript extensions
[](https://github.com/KairoKunazuki/NaokoLeveling/)
[](https://github.com/tryforge/ForgeScript/)
[](https://discord.gg/hcJgjzPvqb)
You can download this from github repo
```bash
npm i https://github.com/KairoKunazuki/NaokoLeveling.git
```
NPM
```bash
npm i naoko-leveling
```
Adding extension to your client initialization
```js
const { NaokoLeveling } = require("naoko-leveling")
const client = new ForgeClient({
...options // The options you have passed
extensions: [
new NaokoLeveling()
]
});
```
This package is based on [quick.db](https://github.com/plexidev/quick.db) and it is possible to save your data using their Database Drivers.
Different type of Database Drivers requires additional packages as listed:
- SqliteDriver requires [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
- MySQLDriver requires [mysql2](https://github.com/sidorares/node-mysql2)
- JSONDriver requires [write-file-atomic](https://github.com/npm/write-file-atomic)
- MongoDriver requires [mongoose](https://github.com/Automattic/mongoose)
Example of using SQLite database
```js
const { NaokoLeveling } = require("naoko-leveling")
const { SqliteDriver } = require("quick.db");
const client = new ForgeClient({
...options // The options you have passed,
extensions: [
new NaokoLeveling(
new SqliteDriver('./leveling.db') // Driver
)
]
})
```