aqualink 1.7.0-beta2 → 1.7.0-beta3

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.
@@ -300,4 +300,4 @@ class Node {
300
300
  }
301
301
  }
302
302
 
303
- module.exports = { Node };
303
+ module.exports = { Node };
@@ -49,6 +49,10 @@ class Player extends EventEmitter {
49
49
  return this.previousTracks.length ? this.previousTracks[0] : null;
50
50
  }
51
51
 
52
+ get currenttrack() {
53
+ return this.current;
54
+ }
55
+
52
56
  addToPreviousTrack(track) {
53
57
  if (this.previousTracks.length >= 50) {
54
58
  this.previousTracks.pop();
@@ -102,10 +106,13 @@ class Player extends EventEmitter {
102
106
  }
103
107
 
104
108
  seek(position) {
105
- if (position < 0) throw new Error("Seek position cannot be negative.");
106
- if (!this.playing) return this;
107
- this.position = position;
108
- this.updatePlayer({ position });
109
+ if (!this.playing) return this;
110
+ const newPosition = this.position + position;
111
+ if (newPosition < 0) {
112
+ throw new Error("Seek position cannot be negative.");
113
+ }
114
+ this.position = newPosition;
115
+ this.updatePlayer({ position: this.position });
109
116
  return this;
110
117
  }
111
118
 
@@ -220,7 +227,6 @@ class Player extends EventEmitter {
220
227
  try {
221
228
  await this.nowPlayingMessage.delete();
222
229
  } catch (error) {
223
- // Consider logging specific errors
224
230
  } finally {
225
231
  this.nowPlayingMessage = null;
226
232
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aqualink",
3
- "version": "1.7.0-beta2",
3
+ "version": "1.7.0-beta3",
4
4
  "description": "An Lavalink wrapper, focused in speed, performance, and features, Based in Riffy!",
5
5
  "main": "build/index.js",
6
6
  "scripts": {