Skip to content

Guards

Guards provide a good developer experience for protecting your commands.

Permissions

You can specify which users are permitted to use a command by referencing their guild permissions.

import { command } from 'jellycommands';
export default command({
name: 'commandname',
description: 'A short description of what the command does',
guards: {
// This means only people with the Administrator
// permission can use the command
permissions: ['Administrator'],
},
run: ({ interaction }) => {
// Do something with interaction
},
});