jericho-player
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "jericho-player", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "LightWeight Framework for discord.js v13 Music Bots and Radio Bots with fast moderation with commands and no memory leak mode", | ||
@@ -23,3 +23,3 @@ "main": "./src/index.js", | ||
"commit": "git-cz", | ||
"preinstall": "npm i playdl-music-extractor && npm i prism-media && npm i youtube-suggest-gen && npm outdated && npm update", | ||
"preinstall": "npm i youtube-suggest-gen && npm outdated && npm update", | ||
"semantic-release": "semantic-release --branches main", | ||
@@ -30,6 +30,6 @@ "commit:push": "git add . && npm run commit && git push", | ||
"devDependencies": { | ||
"@babel/eslint-parser": "^7.16.3", | ||
"@babel/preset-env": "^7.16.4", | ||
"@babel/eslint-parser": "^7.16.5", | ||
"@babel/preset-env": "^7.16.5", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint": "^8.4.1", | ||
"eslint": "^8.5.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
@@ -56,5 +56,5 @@ "eslint-plugin-import": "^2.25.3", | ||
"is-url": "^1.2.4", | ||
"playdl-music-extractor": "^2.5.3", | ||
"playdl-music-extractor": "^2.5.5", | ||
"prism-media": "^1.3.2", | ||
"youtube-suggest-gen": "^1.0.1" | ||
"youtube-suggest-gen": "^1.0.3" | ||
}, | ||
@@ -61,0 +61,0 @@ "directories": { |
@@ -109,1 +109,12 @@ <div align="center"> | ||
``` | ||
### Use Custom User-Agents | ||
```js | ||
const player = new Player(client, { | ||
ExtractorStreamOptions: { | ||
UserAgents: [user-agent], //User-Agents from browser to avoid 429 Errors in 'playdl-music-extractor' | ||
}, | ||
}); | ||
``` |
@@ -51,2 +51,3 @@ const EventEmitter = require('events'); | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -91,2 +92,11 @@ IgnoreError: true, | ||
this.Client.on('voiceStateUpdate', async (OldVoiceState, NewVoiceState) => { | ||
/** | ||
* - Player gets stop managing requests from invalid guild or channel to ignroe crashes | ||
*/ | ||
if ( | ||
!NewVoiceState.guild | ||
|| !OldVoiceState.guild | ||
|| !(OldVoiceState.channel || NewVoiceState.channel) | ||
) return undefined; | ||
/* | ||
@@ -202,2 +212,11 @@ * - QueueInstance Fetched from Private Raw Cache Fetching Method "Player.#QueueCacheFetch(guildId)" | ||
}); | ||
/** | ||
* - Destroy Queue for Deleted Guild to avoid memory leaks and Free Memory for Unused Queue Caches | ||
*/ | ||
this.Client.on('guildDelete', (guild) => { | ||
if (!this.GetQueue(guild.id)) return void null; | ||
return void this.DeleteQueue(guild.id); | ||
}); | ||
} | ||
@@ -224,2 +243,3 @@ | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -418,6 +438,3 @@ IgnoreError: undefined, | ||
async #__handleVoiceConnectionInterchange(QueueInstance, VoiceChannel) { | ||
await join( | ||
this.Client, | ||
VoiceChannel, | ||
); | ||
await join(this.Client, VoiceChannel); | ||
QueueInstance.StreamPacket.VoiceChannel = VoiceChannel; | ||
@@ -430,5 +447,5 @@ if ( | ||
QueueInstance.StreamPacket.subscription.unsubscribe(); | ||
QueueInstance.StreamPacket.subscription = getVoiceConnection(QueueInstance.guildId).subscribe( | ||
QueueInstance.MusicPlayer, | ||
); | ||
QueueInstance.StreamPacket.subscription = getVoiceConnection( | ||
QueueInstance.guildId, | ||
).subscribe(QueueInstance.MusicPlayer); | ||
} | ||
@@ -435,0 +452,0 @@ Player.#QueueCaches[QueueInstance.guildId] = QueueInstance; |
@@ -64,2 +64,3 @@ const { | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -229,2 +230,3 @@ IgnoreError: undefined, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -319,2 +321,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -556,2 +559,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -801,2 +805,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -1003,2 +1008,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -1005,0 +1011,0 @@ }, |
@@ -7,2 +7,3 @@ const Player = require('./Handlers/Player'); | ||
DefaultUserDrivenAudioFilters, | ||
DefaultModesName, | ||
} = require('./types/interfaces'); | ||
@@ -18,2 +19,3 @@ | ||
AudioFilters: DefaultUserDrivenAudioFilters, | ||
PlayerRepeatModes: DefaultModesName, | ||
}; |
@@ -60,2 +60,3 @@ const { | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -243,2 +244,3 @@ Player = undefined, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -348,2 +350,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -434,2 +437,3 @@ }, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -436,0 +440,0 @@ }, |
@@ -40,2 +40,3 @@ const { StreamType } = require('@discordjs/voice'); | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -152,2 +153,3 @@ NoStreamif: false, | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}, | ||
@@ -154,0 +156,0 @@ NoStreamif: false, |
@@ -77,5 +77,5 @@ const { | ||
* @typedef {Object} DefaultModesName | ||
* @property {String} Loop | ||
* @property {String} Repeat | ||
* @property {String} Autoplay | ||
* @property {String} Loop Loop Mode for Queue and Player | ||
* @property {String} Repeat Repeat Mode enum for Queue | ||
* @property {String} Autoplay AutoPlauy Mode enum for Queue and Player | ||
*/ | ||
@@ -132,2 +132,3 @@ const DefaultModesName = { | ||
Proxy: undefined, | ||
UserAgents: undefined, | ||
}; | ||
@@ -134,0 +135,0 @@ |
@@ -13,7 +13,2 @@ const { resolve, dirname } = require('path'); | ||
/** | ||
* @private | ||
* Caching Time Lapse Data for Class Utils | ||
*/ | ||
static #CacheTimeLapseCore = {}; | ||
/** | ||
* stablizingoptions() -> Stabilizing Local and Parent Options with accuracy 80% | ||
@@ -20,0 +15,0 @@ * @param {Object} Local Local function/method options |
@@ -17,2 +17,3 @@ import { | ||
Awaitable, | ||
PlayerRepeatModes | ||
} from './instances' | ||
@@ -72,2 +73,3 @@ import { VoiceConnection } from '@discordjs/voice' | ||
QueueAudioFilters as AudioFilters, | ||
PlayerRepeatModes | ||
} |
@@ -33,2 +33,3 @@ import { | ||
Proxy: String | Array<String> | 'IPAdress:PortNumber' | ||
UserAgents: Array<String> | ||
} | ||
@@ -178,2 +179,3 @@ readonly LeaveOnEmpty: Boolean | ||
readonly Proxy: String | Array<String> | 'IPAdress:PortNumber' | ||
readonly UserAgents: Array<String> | ||
} | ||
@@ -229,2 +231,3 @@ readonly IgnoreError: Boolean | ||
readonly Proxy: String | Array<String> | 'IPAdress:PortNumber' | ||
readonly UserAgents: Array<String> | ||
} | ||
@@ -250,2 +253,3 @@ readonly IgnoreError: Boolean | ||
readonly Proxy: String | Array<String> | 'IPAdress:PortNumber' | ||
readonly UserAgents: Array<String> | ||
} | ||
@@ -266,2 +270,3 @@ readonly IgnoreError: Boolean | ||
readonly Proxy: String | Array<String> | 'IPAdress:PortNumber' | ||
readonly UserAgents: Array<String> | ||
} | ||
@@ -365,1 +370,7 @@ readonly LeaveOnEmpty: Boolean | ||
} | ||
export enum PlayerRepeatModes { | ||
AutoPlay = 'autoplay', | ||
Loop = 'loop', | ||
Repeat = 'repeat' | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
169246
4770
120
+ Addeduser-agents@1.1.394(transitive)
- Removeduser-agents@1.1.392(transitive)
Updatedyoutube-suggest-gen@^1.0.3