Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Releases: Spimy/muse-cli

v1.2.11

09 Jul 18:00
Compare
Choose a tag to compare

"Breaking" Change

  • Regex is now part of the config file renamed to settings. The config is now accessed through client.$settings.config and regexes through client.$settings.regex. It is encouraged to add regexes there, especially if it will be reused many times (issue #12).

New Feature

  • Category property for a command will now be generated if subfoldered using relative path. E.g. mod/ban, the command decorator will look like:
@Command({
    name: 'ban',
    category: 'Mod'
})

This was added in hopes to speed up development time by even just a little bit so the developer does not need to re-specify the category (issue #10)

Small Changes

  • Remove unused imports (issue #13)
  • Refactor boolean check (issue #15)

v1.1.8

03 Jul 13:18
Compare
Choose a tag to compare

Bug Fixes

  • Fix stop command not working when looping (issue #7)
  • Fix loop message not showing boolean value (issue #8)
  • Fix package manager defaulting to npm (issue #9)

v1.1.5

25 Jun 19:43
Compare
Choose a tag to compare

New Feature

  • Multiple prefixes (issue #4)

Bug Fixes

  • Vote from user who left the voice channel is revoked if skip count is set to voice channel size (issue #2)
  • Set default config and remove ownerID from config (issue #3)
  • Validate name inputs during component creation to only allow relative paths (issue #5)
  • Simplify to a single object to contain both needed imports and arguments for event component (issue #6)

v1.0.0

24 Jun 19:53
Compare
Choose a tag to compare

Muse (μ's) CLI

MuseCLI generates a discord.js bot with music features for you! You can use the generate subcommand to automatically generate boilerplate codes for commands and events so you don't have to keep rewriting repeated codes!

NOTICE: If the bot crashes or music randomly gets skipped with errors similar to Error: Too many redirects then
the error comes from YTDL and I am not responsible for any issues related to said library. If any issues of the like
persists, open an issue on their GitHub page.

Requirements

Commands

  • Start a new project:
    muse (n)ew <project-name> <template> [--git] [--skipInstall] [--packageManager=(npm/yarn)]

    Templates currently available: TypeScript

  • Generate a new component:
    muse (g)enerate <component> <component_name>

    Components available: command and event
    Component name supports relative path, e.g: admin/ban will create a ban command inside the admin folder

Installation Instructions

  • Fork this repo
  • Clone your fork to your local machine
  • CD into the bot's root directory
  • Run npm install or yarn

OR

  • Run npm install -g muse-cli or yarn global add muse-cli
  • Run muse new project-name typescript [--git] [--skipInstall] [--packageManager=(npm/yarn)]

THEN FOR EITHER

TOKEN=bot_token
YOUTUBE_API_KEY=api_key
  • Set a command prefix in into muse.json
  • Run npm build or yarn build or tsc -b
  • Run npm dev or yarn dev and if you do, skip the next step
  • Run npm start or yarn start or node dist/index.js

Getting a Discord Bot Token

  • Head on over to Discord's Developer Page
  • Sign in with your Discord account, if you are not already signed in
  • Click the "New Application" button
  • Give the application a name
  • On the "General Information" Tab, give your application an avatar image
  • Click the bot tab on the left hand side menu
  • Then click "Add Bot" & confirm by clicking "Yes, Do it"
  • Finally, copy the bot token

Note: Do NOT share your bot token with anyone!

Command File Template

@Command({
    name: '', // The name of the command
    aliases: [], // Add aliases inside the array (Optional)
    category: '', // Specify which category this command belongs to (Optional)
    usage: '', // Specify the arguments taken by the command (Optional)
    description: '', // A short description about your command (Optional)
    permissions: [], // Add permissions required to run the command (Optional)
    overrideDefaultPermCheck: false // Whether to ignore default permission check (Optional)
})
default class implements CommandExecutor {

    execute = async (message: Message, args: string[]): Promise<boolean> => {
        // Command code in here
        return true;
    }

}

OR

Use muse generate command <command_name> to generate boilerplate for a command

Event File Template

@Event('') // The name of the event
default class implements EventListener {

    listen = async (/* Pass in appropriate arguments for the event name passed in the decorator */) => {
        // Event code in here
    }

}

OR

Use muse generate event <event_name> to generate boilerplate for an event

Author

Spimy:

Support Server

Support Server