soba-bot
v1.0.9
Published
Discord integration library for soba.io
Downloads
4
Readme
Getting Started (Integration)
npm install --save soba-bot
- Set envionment variable:
SOBA_API_KEY
(get at discord.soba.io)
const Discord = require("discord.js");
const { SobaBot } = require("soba-bot");
const client = new Discord.Client();
const sobaBot = new SobaBot(process.env.SOBA_API_TOKEN, client);
client.on("ready", () => {
console.log("Online");
});
client.on("message", message => {
sobaBot.handleMessage(message);
});
client.login(process.env.DISCORD_TOKEN);
Getting Started (Development)
Set envionment variable:
SOBA_API_KEY
(get at discord.soba.io)npm install
npm run watch
Directory Structure
src
└───index.ts # discord bot client logic
└───api # soba.io api functions
└───commands # individual command logic
└───types # type information
└───utils # misc. helper functions