@skullbite/petals
v1.3.2
Published
Discord API Wrapper for Discord of course
Downloads
3
Readme
Discord API Wrapper made with nothing more than the intention of further learning (and typescript, can't forget typescript).
Installation
npm i --save @skullbite/petals
Basic Usage
const
Petals = require("@skullbite/petals"),
bot = new Petals.Client({})
bot.on("ready", () => console.log(`${bot.user.tag} is ready!`))
bot.on("msg", (m) => {
if (m.content === "!hi") m.reply("hello!")
})
bot.run("cool token here")
// Use with the builtin command handler
const
{ Commands } = require("@skullbite/petals"),
bot = new Commands.Bot({ prefix: "!" }, {})
bot.addCommand(
new Commands.Command({ name: "hi" })
.setExec(function (ctx) {
ctx.reply("hello!")
})
)
bot.run("cool token here")
Documentation?
Sorry, although base functionality is working fine, proper documentation is currently being worked on.
Questions?
There's a lot of stuff that hasn't been covered yet, so feel free to ask in the Discord Server if you need help with something or have a question.
Extended Credits
- Ice for fixing command handler issues.
- PapiOphidan for helping me with REST stuff.
- BowsiePup / Donovan_DMC for helping me write the original command handler.
- August for ✨inspiration✨ (no i didn't steal wumpcord)
License
GPL-3.0-or-later