JSPM

discord-bot-nestjs-cli

1.1.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 31
    • Score
      100M100P100Q39144F
    • License ISC

    A CLI tool to create Discord bots using NestJS.

    Package Exports

    • discord-bot-nestjs-cli
    • discord-bot-nestjs-cli/index.js

    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 (discord-bot-nestjs-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Discord Bot With NestJS CLI

    Overview

    The Discord Bot With NestJS CLI is a command-line tool designed to simplify the process of creating Discord bots using the NestJS framework. With a user-friendly interface and minimal configuration, this CLI streamlines the setup of a robust and scalable bot project.

    Features

    • Automated project setup using NestJS CLI.
    • Custom module and service for Discord.js integration.
    • Supports popular package managers: npm, yarn, and pnpm.
    • Includes environment variable setup for secure bot token management.
    • Keeps terminal output clean and focused with spinner feedback.

    Prerequisites

    Before using this CLI, ensure the following:

    Installation

    First, install the CLI globally using npm:

    npm install -g discord-bot-nestjs-cli

    Usage

    Commands

    • init: Create a new Discord bot project.
    • version: Display the CLI version.
    • help: Show available commands and their usage.

    Initialize a Project

    Run the following command to create a new project:

    discord-bot-nestjs-cli init

    The CLI will prompt you for:

    • Project Name: Name of the folder where the project will be created.
    • Package Manager: Choose between npm, yarn, or pnpm.

    Example Workflow

    1. Run the init command:

      discord-bot-nestjs-cli init
    2. Follow the prompts to configure the project.

    3. Navigate to the project folder:

      cd <project-name>
    4. Start the development server:

      npm run start:dev

      or

      yarn start:dev

    Project Structure

    The CLI sets up a project with the following structure:

    <project-name>/
    ├── src/
    │   ├── discord/
    │   │   ├── discord.module.ts
    │   │   ├── discord.service.ts
    ├── package.json
    ├── .env
    • src/discord: Contains the module and service for Discord bot functionality.
    • .env: Holds the DISCORD_ENV variable for your bot token.

    Environment Variables

    The .env file includes:

    DISCORD_ENV=your_discord_bot_token_here

    Replace your_discord_bot_token_here with your actual Discord bot token.

    Contribution

    Contributions are welcome! Feel free to fork the repository, make improvements, and submit a pull request.

    License

    This project is licensed under the MIT License. See the LICENSE file for details.

    Author

    Created by Mquiuqui to simplify Discord bot development with NestJS.