@skullbite/petals
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

courtcaselogo-Recovered

NPM - GITHUB - DISCORD

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

Readme

Keywords

none

Package Sidebar

Install

npm i @skullbite/petals

Weekly Downloads

0

Version

1.3.2

License

GPL-3.0-or-later

Unpacked Size

286 kB

Total Files

162

Last publish

Collaborators

  • skullbite