Registering Commands
Every command type can be registered either globally, or per guild.
Global
When a command is registered globally, all guilds have access to it. You can enable that with the global
option.
import { command } from 'jellycommands';
export default command({ global: true,});
Guilds
You can also a register a command per guild, using the guilds
option. These take effect instantly.
import { command } from 'jellycommands';
export default command({ // This command will register in both of these guilds guilds: ['663140687591768074', '755788441161302136'],});
Combined
You can combine the guilds
and global
option freely! Though this may have some unwanted side effects such as a command appearing twice.
import { command } from 'jellycommands';
export default command({ // This command will register in both of these guilds guilds: ['663140687591768074', '755788441161302136'],
// It will also register globally global: true,});