A powerful extension to play music on your ForgeScript Discord client.
- Installation
- Basic Setup
- Commands
- Events
- Credits
- Run the following command to install the package:
npm i erisa-music
- 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.
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>
`
});
You must declare the events you want to listen to in extension constructor options under "events" property.
var voice = new ErisaVoice({
events: [
"trackStart",
"trackEnd",
...
]
});
- Asayukiii (Erisa): Extension author and maintainer.