Firework
๐ Command framework and utilities for the Eris Discord library.
Install / Use
/learn @TorchedArchive/FireworkREADME
Table of Contents
Install
npm install @luvella/firework
Example
See here for an example bot.
Or...
const Firework = require('@luvella/firework');
const bot = new Firework.Client('token');
const ping = new Firework.Command(bot, {
name: 'ping',
aliases: ['pong']
}).executor(function ({ msg, args }) {
msg.channel.createMessage(`Ponged ${args[0]}!`);
// Think of `this.bot` as `bot`
this.bot.logger.debug('ponged');
});
bot.addCommand(ping);
bot.on('messageCreate', (msg) => {
const prefix = '!';
if (!msg.content.startsWith(prefix)) return;
const args = msg.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
const cmd = bot.getCommand(command); // works with the name and aliases as well
if (!cmd) return;
cmd.run({ msg, args });
})
Links
- Documentation: Soon at https://luvella.github.io/Firework
- Alternative(s)
- hibiscus for a higher level solution
License
Firework is licensed under the MIT license.
Read here for more info.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
