Closed
Description
NodeJs Version: 23.9.0
Lavalink Version: 4.0.8
Magmastream NPM Package Version: 2.8.6
Describe the Bug
In the magmastream docs, the Last FM API key is marked as optional. However, TypeScript will throw a compile time error if this property is not included within the Manager constructor. Additionally, passing an empty string is not allowed, as magmastream will throw a runtime error:
if (typeof lastFmApiKey !== "undefined" && (typeof lastFmApiKey !== "string" || lastFmApiKey.trim().length === 0)) {
throw new TypeError('Manager option "lastFmApiKey" must be a non-empty string.');
}
To Reproduce
Steps to reproduce the behavior:
- Create an instance of Manager, without Last FM API key
- Observe as you are unable to compile your code (assuming TypeScript)
Expected Behavior
An instance of Manager can be created without specifying a Last FM API key.