Add useful features to discordx

Usage no npm install needed!

<script type="module">
  import discordxUtilities from 'https://cdn.skypack.dev/@discordx/utilities';


Discord server NPM version NPM downloads Build status paypal

Create a discord bot with TypeScript and Decorators!


📖 Introduction

Add useful features to discordx, If a feature isn't available, request it.

💻 Installation

Version 16.6.0 or newer of Node.js is required

npm install @discordx/utilities
yarn add @discordx/utilities

📟 @Category

Create group of commands


@Category("Admin Commands")
class SlashExample {
  // commands

  myCommand(interaction: CommandInteraction) {
// Access data from anywhere
import { CategoryMetaData } from "@discord/utilities";

// access admin commands
CategoryMetaData.get("Admin Commands");

⚔️ guards

Useful guards created by the Discord.ts team to use in your bot!

Rate limit

This guard will rate limit a user for a specified amount of time. When set, a user can only call a command x amount of times after that, a cooldown is applied disallowing any more calls to the command until the cooldown is over.

This cooldown starts from the moment the user sends the last message.

If your cooldown is 10 seconds, and you allow 3 calls of your command, the user will have 10 seconds to call it 3 times, with the timer resetting after each call.


export abstract class RateLimitExample {
   * 1 command every 30 seconds with default message
  @Guard(RateLimit(TIME_UNIT.seconds, 30))
  rateLimit1(interaction: CommandInteraction): void {
    interaction.reply("It worked!");

   * Allow 3 command before rate limit of 30 seconds (from last message)
  @Guard(RateLimit(TIME_UNIT.seconds, 30, "Please wait `30` seconds!", 3))
  rateLimit3(interaction: CommandInteraction): void {
    interaction.reply("It worked!");

   * Rate limit simple command
   * @param message
   * @private
  @Guard(RateLimit(TIME_UNIT.seconds, 10))
  private async rateLimitSimpleCommand({
  }: SimpleCommandMessage): Promise<void> {
    message.reply("It worked!");


hello({ message }: SimpleCommandMessage): void {
  message.reply("It worked!");

This will work on both Slash and Simple commands

☎️ Need help?

Ask in discord server or open a issue

Thank you

Show your support for discordx by giving us a star on github.