A javascript/node.js discord API wrapper making commands easier than current wrappers.
Commandcord.js is a discord API wrapper that uses an in-depth command handler that makes it easier to integrate commands, due to it being built in. This prevents spaghetti code, while letting you use all the same things that other wrappers do.
const Discord = require("commandcord.js") const bot = new Discord.commands.Bot(command_prefix="!") bot.cmd.on("ping", (ctx) => { ctx.send("pong!") }) // When '!ping' is typed, then the bot will reply with 'pong!'. bot.run("BOT_TOKEN")
const Discord = require("commandcord.js") const bot = new Discord.commands.Bot() bot.events.on("message", (m) => { if(m.content === "!ping"){ await m.channel.send("pong!") } }) // When '!ping' is typed, then the bot will reply with 'pong!'. bot.run("BOT_TOKEN")