Skip to content

Asayukiii/fs-music

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erisa Music

A powerful extension to play music on your ForgeScript Discord client.


Table of Contents

  • Installation
  • Basic Setup
  • Commands
  • Events
  • Credits

Installation

  1. Run the following command to install the package:
npm i erisa-music
  1. Now, declare the extension in your main file:
var { Cacher, ErisaVoice, Filter, PluginName } = require("@asayukiii/fs-music");
var { ForgeClient } = require("@tryforge/forgescript");

var voice = new ErisaVoice({
    plugins: [
        [PluginName.Cacher, new Cacher("memory")],
        [PluginName.Filter, new Filter({
            filterFromStart: false
        })]
    ],
    manager: {
        requestOptions: {
            offsetTimeout: 0,
            soundcloudLikeTrackLimit: 200
        },
        searchOptions: {
            youtubeClient: "TV_EMBEDDED",
            youtubeAuth: true
        }
    }
});

var bot = new ForgeClient({
    ...your_setup,
    extensions: [
        voice
    ]
});

Congratulations! You have installed music extension in your Discord client.


Commands

To add a command, you must use the VoiceCommandManager.

var voice = new ErisaVoice({ ... });
var bot = new ForgeClient({ ... });

voice.commands.add({
    type: "trackStart",
    code: `
        <COMMAND CODE HERE>
    `
});

Events

You must declare the events you want to listen to in extension constructor options under "events" property.

var voice = new ErisaVoice({
    events: [
        "trackStart",
        "trackEnd",
        ...
    ]
});

Credits

  1. Asayukiii (Erisa): Extension author and maintainer.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published