v1.2.9
A basic discord bot lib for node.js and deno but the library doesn't cache discord objects.
Repository
Current version released
5 years ago
Versions
discord-bot-lib
A basic discord bot lib for deno but the library doesn’t cache discord objects.
Key points
- Simple command handler.
- NO third-party dependencies
- Simple handler for slash commands.
- This lib does NOT cache external discord objects.
- This lib does NOT support voice (sorry music bots)
- This lib gives you full control on how you cache discord data.
- This lib gives you full control on how you handle discord gateway events.
- Really customizable.
Example
import Bot from 'https://deno.land/x/discord_bot_lib@v1.2.8/mod.ts';
const bot: Bot = new Bot({
token: "discord token",
prefix: "!"
});
bot.command({
name: "ping",
aliases: ["pong"],
run: async (ctx: any) => {
await ctx.send(`pong! ${bot.ping} ms`);
}
});
bot.addEventListener('ready', () => {
console.log("The bot is ready to use!");
});
bot.run();