0.9.1 • Published 2 years ago

@itsmapleleaf/gatekeeper v0.9.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

gatekeeper

Gatekeeper is a ✨reactive✨ interaction framework for discord.js!

Install:

# npm
npm install @itsmapleleaf/gatekeeper discord.js

# yarn
yarn add @itsmapleleaf/gatekeeper discord.js

# pnpm
pnpm add @itsmapleleaf/gatekeeper discord.js

Here's a taste of what Gatekeeper looks like:

import { buttonComponent, Gatekeeper } from "@itsmapleleaf/gatekeeper"
import { Client, Intents } from "discord.js"

const client = new Client({
  intents: [Intents.FLAGS.GUILDS],
})

;(async () => {
  const gatekeeper = await Gatekeeper.create({
    client,
  })

  gatekeeper.addSlashCommand({
    name: "counter",
    description: "make a counter",
    run(context) {
      let count = 0

      context.reply(() => [
        `button pressed ${count} times`,
        buttonComponent({
          style: "PRIMARY",
          label: "press it",
          onClick: () => {
            count += 1
          },
        }),
      ])
    },
  })

  await client.login(process.env.BOT_TOKEN)
})()

And a silly example, demonstrating the power of the library. You can find the code here

showcase

0.8.1-0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.9.1

2 years ago

0.7.0

2 years ago

0.6.1

3 years ago

0.5.0-1

3 years ago

0.5.0-0

3 years ago

0.5.0-3

3 years ago

0.5.0-2

3 years ago

0.5.0-4

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.6.0

3 years ago

0.3.2

3 years ago

0.3.3

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.0-alpha.10

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.0-alpha.9

3 years ago

0.0.0-alpha.8

3 years ago

0.0.0-alpha.7

3 years ago

0.0.0-alpha.6

3 years ago

0.0.0-alpha.5

3 years ago

0.0.0-alpha.4

3 years ago

0.0.0-alpha.3

3 years ago

0.0.0-alpha.2

3 years ago

0.0.0-alpha.1

3 years ago

0.0.0-alpha.0

3 years ago