Skip to content

Commit

Permalink
Merge pull request #27 from EwarinDev/dev
Browse files Browse the repository at this point in the history
Update 1.1.0
  • Loading branch information
EvarinDev authored Sep 6, 2024
2 parents 8a3e877 + 4086530 commit 7457e44
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 259 deletions.
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
"name": "sunday.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"version": "1.0.18",
"version": "1.1.0",
"description": "Sunday a lavalink wrapper",
"license": "MIT",
"author": "FAYStarNext",
"author": "EwarinDev",
"scripts": {
"build:js": "npx babel src --out-dir dist --extensions \".ts,.tsx\" --source-maps inline",
"lint": "npx eslint src/**/*.ts",
"test:manager": "bun test/manager.ts",
"test:player": "bun test/player.ts"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@eslint/js": "^9.9.1",
"@types/bun": "latest",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"globals": "^15.9.0",
"typescript-eslint": "^8.0.1",
"@babel/cli": "^7.24.8",
"typescript-eslint": "^8.4.0",
"@babel/cli": "^7.25.6",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7"
},
"publishConfig": {
Expand All @@ -32,11 +32,12 @@
},
"homepage": "https://github.com/FAYStarNext/Sunday.ts#readme",
"peerDependencies": {
"typescript": "^5.5.3"
"typescript": "^5.5.4"
},
"dependencies": {
"@discordjs/collection": "^2.1.0",
"discord.js": "^14.15.3",
"@discordjs/collection": "^2.1.1",
"axios": "^1.7.7",
"discord.js": "^14.16.1",
"tiny-typed-emitter": "^2.1.0",
"ws": "^8.18.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from "./structures/Manager";
export * from "./structures/Node";
export * from "./structures/Player";
export * from "./structures/Queue";
export * from "./structures/Utils";
export * from "./structures/Utils";
36 changes: 18 additions & 18 deletions src/structures/Filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Band, bassBoostEqualizer, softEqualizer, trebleBassEqualizer, tvEqualiz
import { Player } from "./Player";

export class Filters {
public distortion: DistortionOptions | null;
public distortion: distortionOptions | null;
public equalizer: Band[];
public karaoke: KaraokeOptions | null;
public karaoke: karaokeOptions | null;
public player: Player;
public rotation: RotationOptions | null;
public timescale: TimescaleOptions | null;
public vibrato: VibratoOptions | null;
public rotation: rotationOptions | null;
public timescale: timescaleOptions | null;
public vibrato: vibratoOptions | null;
public volume: number;

private filterStatus: {
Expand Down Expand Up @@ -68,7 +68,7 @@ export class Filters {
return this;
}

private setFilterStatus(filter: keyof AvailableFilters, status: boolean): this {
private setFilterStatus(filter: keyof availableFilters, status: boolean): this {
this.filterStatus[filter] = status;
return this;
}
Expand Down Expand Up @@ -144,30 +144,30 @@ export class Filters {
}

/** Applies the karaoke options specified by the filter. */
public setKaraoke(karaoke?: KaraokeOptions): this {
public setKaraoke(karaoke?: karaokeOptions): this {
return this.applyFilter({
property: "karaoke",
value: karaoke,
}).setFilterStatus("karaoke", true);
}

/** Applies the timescale options specified by the filter. */
public setTimescale(timescale?: TimescaleOptions): this {
public setTimescale(timescale?: timescaleOptions): this {
return this.applyFilter({ property: "timescale", value: timescale });
}

/** Applies the vibrato options specified by the filter. */
public setVibrato(vibrato?: VibratoOptions): this {
public setVibrato(vibrato?: vibratoOptions): this {
return this.applyFilter({ property: "vibrato", value: vibrato });
}

/** Applies the rotation options specified by the filter. */
public setRotation(rotation?: RotationOptions): this {
public setRotation(rotation?: rotationOptions): this {
return this.applyFilter({ property: "rotation", value: rotation });
}

/** Applies the distortion options specified by the filter. */
public setDistortion(distortion?: DistortionOptions): this {
public setDistortion(distortion?: distortionOptions): this {
return this.applyFilter({ property: "distortion", value: distortion });
}

Expand Down Expand Up @@ -199,13 +199,13 @@ export class Filters {
}

/** Returns the status of the specified filter . */
public getFilterStatus(filter: keyof AvailableFilters): boolean {
public getFilterStatus(filter: keyof availableFilters): boolean {
return this.filterStatus[filter];
}
}

/** Options for adjusting the timescale of audio. */
interface TimescaleOptions {
interface timescaleOptions {
/** The speed factor for the timescale. */
speed?: number;
/** The pitch factor for the timescale. */
Expand All @@ -215,21 +215,21 @@ interface TimescaleOptions {
}

/** Options for applying vibrato effect to audio. */
interface VibratoOptions {
interface vibratoOptions {
/** The frequency of the vibrato effect. */
frequency: number;
/** * The depth of the vibrato effect.*/
depth: number;
}

/** Options for applying rotation effect to audio. */
interface RotationOptions {
interface rotationOptions {
/** The rotation speed in Hertz (Hz). */
rotationHz: number;
}

/** Options for applying karaoke effect to audio. */
interface KaraokeOptions {
interface karaokeOptions {
/** The level of karaoke effect. */
level?: number;
/** The mono level of karaoke effect. */
Expand All @@ -240,7 +240,7 @@ interface KaraokeOptions {
filterWidth?: number;
}

interface DistortionOptions {
interface distortionOptions {
sinOffset?: number;
sinScale?: number;
cosOffset?: number;
Expand All @@ -251,7 +251,7 @@ interface DistortionOptions {
scale?: number;
}

interface AvailableFilters {
interface availableFilters {
bassboost: boolean;
distort: boolean;
eightD: boolean;
Expand Down
Loading

0 comments on commit 7457e44

Please sign in to comment.