Add a message command
gatekeeper.addMessageCommand({
name: 'reverse',
run: (ctx) => {
ctx.reply(() => ctx.targetMessage.content.split("").reverse().join(""))
}
})
Add a slash command
gatekeeper.addSlashCommand({
name: "ping",
description: "Pong!",
run: (ctx) => ctx.reply(() => "Pong!"),
})
Add a user command
gatekeeper.addUserCommand({
name: 'get user color',
run: (ctx) => ctx.reply(() => ctx.targetGuildMember?.color ?? "not in a guild!"),
})
Create a Gatekeeper instance
Returns a list of basic info for each added command
Generated using TypeDoc
A gatekeeper instance. Holds commands, manages discord interactions, etc.