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

MuseCLI generates a discord.js bot with music features for you. You can use the generate command to automatically generate boilerplate for commands and events so you don't have to keep re-writing the same code every time you create a new component.

License

Notifications You must be signed in to change notification settings

Spimy/muse-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muse (μ's) CLI

THIS PROJECT HAS BEEN ABANDONED

I myself have made use of MuseCLI for a long time to create my own bots because it is very convenient to set some stuffs up. However, I have officially dropped support for this project. This will be archived very soon. Instead, please check out @yor/core and @yor/commands. The former is a Discord.JS wrapper while the latter is an optional module you can install for the wrapper.

A CLI is being worked on to make the setup easier as it does require quite a bit of initial boilerplate.

MuseCLI

Muse Logo Image
Discord Users Online

Buy Me A Coffee

npm GitHub npm Libraries.io dependency status for latest release

MuseCLI generates a discord.js bot with music features for you. You can use the generate command to automatically generate boilerplate for commands and events so you don't have to keep re-writing the same code every time you create a new component.

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

For more details, please check the Wiki

  • 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

Features

Start Music
  • Multiple Ways to Start Music:

    1. Play with YouTube video links (also supports YouTube playlist links):
      Method 1

    2. Play with search query:
      Method 2

    3. Play using search command to make a selection from 10 results:
      Method 3

Music and Queue Loop
  • You can loop the currently playing music or queue.

    If music is looping, it will never jump to the next music in the queue unless you turn if off or skip it
    If queue is looping, the entire queue will never end.

    Loop command

Skipping music
  • Vote Skip if not Admin:

    Skip command

Paginated Queue Embed
  • Each page contains up to 5 videos so you need at least 6 videos in the queue for pagination to start
    The reactor for pagination lasts for 60 seconds. If 60 seconds have passed, rerun the queue command for pagination to work again

    Queue embed

Duration Bar
  • Updates every 5 seconds to avoid rate limit
    Duration bar
Queue and Video Clearing
  • Clear the whole queue or a specific music at a specified index:
    Clear queue
Help Message
  • Responsive Help Message:
    Supports multiple prefixes too Help message

Project Setup

Installation Instructions

For Development

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

For Contribution

  1. Fork this repo
  2. Clone your fork to your local machine
  3. CD into the muse-cli project root directory
  4. Run npm install or yarn
  5. Create a new branch and make your contribution
  6. Make a pull request on GitHub for me to review

Sensitive Information

You must at all cost keep your sensitive information like Discord Bot Token and YouTube API Key safe and the best way to do that is via environment variables. You can set them directly in your SYSTEM ENV, but setting them inside a .env file in your project root folder is recommended:

TOKEN=bot_token
YOUTUBE_API_KEY=api_key

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

I am Spimy, but my Discord is under a different name most of the time.

Support Server

Support Server

About

MuseCLI generates a discord.js bot with music features for you. You can use the generate command to automatically generate boilerplate for commands and events so you don't have to keep re-writing the same code every time you create a new component.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published