distube 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -267,12 +267,12 @@ declare class SearchResultVideo extends ISearchResult {
267
267
  thumbnail: string;
268
268
  constructor(info: Video);
269
269
  }
270
+ declare type SearchResult = SearchResultVideo | SearchResultPlaylist;
270
271
  declare class SearchResultPlaylist extends ISearchResult {
271
272
  type: SearchResultType.PLAYLIST;
272
273
  length: number;
273
274
  constructor(info: Playlist$1);
274
275
  }
275
- declare type SearchResult = SearchResultVideo | SearchResultPlaylist;
276
276
 
277
277
  declare class Song<T = unknown> {
278
278
  #private;
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- "use strict";
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -57,7 +56,7 @@ var require_package = __commonJS({
57
56
  "package.json"(exports, module2) {
58
57
  module2.exports = {
59
58
  name: "distube",
60
- version: "4.0.0",
59
+ version: "4.0.1",
61
60
  description: "A Discord.js module to simplify your music commands and play songs with audio filters on Discord without any API key.",
62
61
  main: "./dist/index.js",
63
62
  module: "./dist/index.mjs",
@@ -130,21 +129,21 @@ var require_package = __commonJS({
130
129
  undici: "^5.8.0"
131
130
  },
132
131
  devDependencies: {
133
- "@babel/core": "^7.18.6",
132
+ "@babel/core": "^7.18.9",
134
133
  "@babel/plugin-proposal-class-properties": "^7.18.6",
135
- "@babel/plugin-proposal-object-rest-spread": "^7.18.6",
136
- "@babel/preset-env": "^7.18.6",
134
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.9",
135
+ "@babel/preset-env": "^7.18.9",
137
136
  "@babel/preset-typescript": "^7.18.6",
138
137
  "@commitlint/cli": "^17.0.3",
139
138
  "@commitlint/config-conventional": "^17.0.3",
140
- "@discordjs/voice": "latest",
139
+ "@discordjs/voice": "^0.11.0",
141
140
  "@distube/docgen": "distubejs/docgen",
142
141
  "@types/jest": "^28.1.6",
143
142
  "@types/node": "^18.0.6",
144
- "@typescript-eslint/eslint-plugin": "^5.30.6",
145
- "@typescript-eslint/parser": "^5.30.6",
143
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
144
+ "@typescript-eslint/parser": "^5.30.7",
146
145
  "babel-jest": "^28.1.3",
147
- "discord.js": "latest",
146
+ "discord.js": "^14.0.2",
148
147
  eslint: "^8.20.0",
149
148
  "eslint-config-distube": "^1.6.4",
150
149
  "eslint-config-prettier": "^8.5.0",
@@ -422,6 +421,7 @@ var Playlist = class {
422
421
  this.songs = playlist;
423
422
  this.name = this.songs[0].name ? `${this.songs[0].name} and ${this.songs.length - 1} more songs.` : `${this.songs.length} songs playlist`;
424
423
  this.thumbnail = this.songs[0].thumbnail;
424
+ this.member = member || void 0;
425
425
  } else {
426
426
  this.source = (playlist.source || "youtube").toLowerCase();
427
427
  if (!Array.isArray(playlist.songs) || !playlist.songs.length)
@@ -430,12 +430,12 @@ var Playlist = class {
430
430
  this.name = playlist.name || playlist.title || (this.songs[0].name ? `${this.songs[0].name} and ${this.songs.length - 1} more songs.` : `${this.songs.length} songs playlist`);
431
431
  this.url = playlist.url || playlist.webpage_url;
432
432
  this.thumbnail = playlist.thumbnail || this.songs[0].thumbnail;
433
+ this.member = member || playlist.member || void 0;
433
434
  }
434
435
  this.songs.map((s) => s.constructor.name === "Song" && (s.playlist = this));
435
436
  if (properties)
436
437
  for (const [key, value] of Object.entries(properties))
437
438
  this[key] = value;
438
- this.member = member;
439
439
  this.metadata = metadata;
440
440
  }
441
441
  get duration() {