Getting Started
Erine@adv is a powerful oceanic.js-based command framework to allow you make bots more easily providing you ready-to-use advanced classes and methods.
Example Setup
const { Erine } = require('erine'); // for TypeScript use: import { Erine } from 'erine';
const bot = new Erine({
auth: "Bot BOT TOKEN HERE",
gateway: {
intents: [...intents]
},
owners: string[]
prefix: string | prefix(ctx) => string;
});
bot.connect(string);
Templates
JavaScript setup guide
This package can be used with JavaScript but babel is needed.
Install the required packages
npm install --save-dev @babel/plugin-proposal-decorators @babel/cli @babel/core @babel/preset-env
Create a new ".babelrc" file and paste the following configuration
{
"presets": ["@babel/preset-env"],
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
["@babel/plugin-proposal-class-properties", {"loose": true}],
["@babel/plugin-proposal-private-property-in-object", {"loose": true}],
["@babel/plugin-proposal-private-methods", {"loose": true}]
]
}
Add the following script to your "package.json"
"build": "babel src -d dist"
"src" and "dist" depends on how you named your source and distribution folders respectively. Run this script to transpile the JS src to a global-compatible one.
Now run your distribution folder!
$ npm run build
$ node dist/index.js
What you'll need
- Node.JS 16.16 or above.
- Basic JavaScript knowledge is expected.
Are you ready?
Take a look to the next steps, have fun!