0.9.1 • Published 4 years ago
@itsmapleleaf/gatekeeper v0.9.1
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
0.8.1-0
4 years ago
0.9.0
4 years ago
0.8.0
4 years ago
0.9.1
4 years ago
0.7.0
4 years ago
0.6.1
4 years ago
0.5.0-1
4 years ago
0.5.0-0
4 years ago
0.5.0-3
4 years ago
0.5.0-2
4 years ago
0.5.0-4
4 years ago
0.5.0
4 years ago
0.4.0
4 years ago
0.6.0
4 years ago
0.3.2
4 years ago
0.3.3
4 years ago
0.3.1
4 years ago
0.3.0
4 years ago
0.2.0
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.1
4 years ago
0.0.0
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.0-alpha.10
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.0-alpha.9
4 years ago
0.0.0-alpha.8
4 years ago
0.0.0-alpha.7
4 years ago
0.0.0-alpha.6
4 years ago
0.0.0-alpha.5
4 years ago
0.0.0-alpha.4
4 years ago
0.0.0-alpha.3
4 years ago
0.0.0-alpha.2
4 years ago
0.0.0-alpha.1
4 years ago
0.0.0-alpha.0
4 years ago