0.8.4 • Published 7 years ago
aoba v0.8.4
Lightweight Discord bot framework written in JS and using Eris.
If you choose to use this framework, you agree to not ask any questions unless you have a basic understanding about installing Node modules, running and developing JS applications.
Install Guide:
Use this command to install Aoba module:
npm install aoba
Here is an example of basic ping-pong bot:
// app.js
var _aoba = require('aoba'),
var aoba = new _aoba({
token: 'Enter your token', // Enter your Discord token here
path: process.cwd(), // If your commands folder is in project directory
prefix: '!', // Bot prefix
name: 'Aoba', // You can define any variables in objects and use them in commands
mods: 222739089009541130 // Mods id, can be an array
})
aoba.run(); // Run bot, if it launched successfully you'll get message 'Bot is ready!'
Example commands:
//commands/ping.js
module.exports = {
task: (bot, m, args) => {
m.channel.createMessage('Pong!');
}
}
If you want to use declared variables in options object:
//commands/stats.js
module.exports = {
task: function(bot, m, args) {
m.channel.createMessage(`\`\`\`md
[Name]: ${bot.options.name}
[Author]: ${bot.options.author}
[Version]: ${bot.options.version}
[About]: ${bot.options.about} \`\`\``)
}
}