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

v1.0.0

Compare
Choose a tag to compare
@Spimy Spimy released this 24 Jun 19:53
· 51 commits to master since this release

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