Package Exports
- commandkit-helper
- commandkit-helper/dist/index.js
- commandkit-helper/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (commandkit-helper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
commandkit-helper
CommandKit-Helper is a simple library that will help with building comamnds to work with CommandKit
Works with Discord.JS V14
Features
- Extreamly Beginner friendly
- Allows you to have proper types when using CommandKit
- Custom extended discord client so you can have custom options inside the client itself
Installation
npm install commandkit-helperUsage
This is a small usage example of how you can use this package
CJS
CustomDiscordClient
const { ExtendedClient } = require('commandkit-helper');
const client = new ExtendedClient(
{
intents: [],
},
{
// Here would go any custom options you want to always
// be avaiable from the client provided inside the commandbuilders
testNumber: 21,
}
);
console.log(client.customOptions.testNumber); // -> 21 //Note: this will not give you intellisenceCommandBuilder
const { BasicSlashCommand } = require('commandkit-helper')
module.exports = new BasicSlashCommand({
run: async ({ interaction, client, handler }) => {
},
data: new SlashCommandBuilder()...
// The options do have types so you can
// add only the ones you want or custom ones
options: {
}
})ESM
CustomDiscordClient
import { ExtendedClient } from 'commandkit-helper';
const client = new ExtendedClient(
{
intents: [],
},
{
// Here would go any custom options you want to always
// be avaiable from the client provided inside the commandbuilders
testNumber: 21,
}
);
console.log(client.customOptions.testNumber); // -> 21 //Note: this will not give you intellisenceCommandBuilder
import { BasicSlashCommand } from 'commandkit-helper'
export = new BasicSlashCommand({
run: async ({ interaction, client,handler }) => {
},
data: new SlashCommandBuilder()...
// The options do have types so you can
// add only the ones you want or custom ones
options: {
}
})Changelog
v1.2.0
- Improved README
- UserPermissions && BotPermissions are now of type PermissionResolvable
- Added custom discord client
V1.1.0
- Added support for custom options
- Changed to using SlashCommandProps from CommandKit