JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q39599F
  • License MIT

A simple helper for the npm package CommandKit.

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

  • Extremely Beginner friendly
  • Allows you to have command builders for CommandKit

Installation

npm install commandkit-helper

Usage

This is a small usage example of how you can use this package

CJS

const {
    SlashCommand,
    UserContextCommand,
    MessageContextCommand,
} = require('commandkit-helper');

module.exports = new SlashCommand()
    .setData({
        name: 'ping',
        description: 'Pong!',
    })
    .setRun(async ({ interaction, client, handler }) => {});
// You can also set all the options if needed by default
// all the values are false so if you dont set them they wont matter
// same goes for the ones below

module.exports = new UserContextCommand()
    .setData({
        name: 'user',
        type: CommandType.User,
    })
    .setRun(async ({ interaction, client, handler }) => {});

module.exports = new MessageContextCommand()
    .setData({
        name: 'content',
        type: CommandType.Message,
    })
    .setRun(async ({ interaction, client, handler }) => {});

ESM

import {
    SlashCommand,
    UserContextCommand,
    MessageContextCommand,
} from 'commandkit-helper';

export default new SlashCommand()
    .setData({
        name: 'ping',
        description: 'Pong!',
    })
    .setRun(async ({ interaction, client, handler }) => {});
// You can also set all the options if needed by default
// all the values are false so if you dont set them they wont matter
// same goes for the ones below

export default new UserContextCommand()
    .setData({
        name: 'user',
        type: CommandType.User,
    })
    .setRun(async ({ interaction, client, handler }) => {});

export default new MessageContextCommand()
    .setData({
        name: 'content',
        type: CommandType.Message,
    })
    .setRun(async ({ interaction, client, handler }) => {});

Changelog

v1.3.0

  • Added way better command builders that are alot easier to use look alot like the SlashCommandBuilder from D.JS
  • Removed custom discord client as it wont work with these new builders
  • Removed the old types so this update will cause some breaking changes but will be easy to fix