Skip to content

Commit

Permalink
Merge pull request #84 from RainyXeon/dev
Browse files Browse the repository at this point in the history
5.1.6
  • Loading branch information
RainyXeon authored Apr 30, 2024
2 parents 7178190 + e4dd71c commit 1614cb3
Show file tree
Hide file tree
Showing 33 changed files with 430 additions and 569 deletions.
16 changes: 2 additions & 14 deletions src/commands/Filter/3D.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,17 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
rotation: { rotationHz: 0.2 },
},
},
};

await player?.send(data);
player?.filter.set("eightD");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -57,7 +46,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [embed] });
}
}
31 changes: 2 additions & 29 deletions src/commands/Filter/Bass.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,32 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
equalizer: [
{ band: 0, gain: 0.1 },
{ band: 1, gain: 0.1 },
{ band: 2, gain: 0.05 },
{ band: 3, gain: 0.05 },
{ band: 4, gain: -0.05 },
{ band: 5, gain: -0.05 },
{ band: 6, gain: 0 },
{ band: 7, gain: -0.05 },
{ band: 8, gain: -0.05 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0.05 },
{ band: 11, gain: 0.05 },
{ band: 12, gain: 0.1 },
{ band: 13, gain: 0.1 },
],
},
},
};

await player?.send(data);
player?.filter.set("bass");

const bassed = new EmbedBuilder()
.setDescription(
Expand All @@ -72,7 +46,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [bassed] });
}
}
69 changes: 17 additions & 52 deletions src/commands/Filter/Bassboost.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Manager } from "../../manager.js";
import { EmbedBuilder, ApplicationCommandOptionType, Message } from "discord.js";
import delay from "delay";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";

Expand Down Expand Up @@ -41,31 +40,7 @@ export default class implements Command {
const player = client.rainlink.players.get(handler.guild!.id);

if (!value) {
const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
equalizer: [
{ band: 0, gain: 0.1 },
{ band: 1, gain: 0.1 },
{ band: 2, gain: 0.05 },
{ band: 3, gain: 0.05 },
{ band: 4, gain: -0.05 },
{ band: 5, gain: -0.05 },
{ band: 6, gain: 0 },
{ band: 7, gain: -0.05 },
{ band: 8, gain: -0.05 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0.05 },
{ band: 11, gain: 0.05 },
{ band: 12, gain: 0.1 },
{ band: 13, gain: 0.1 },
],
},
},
};

await player?.send(data);
player?.filter.set("bass");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -75,7 +50,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
return handler.editReply({ content: " ", embeds: [embed] });
}

Expand All @@ -87,31 +61,23 @@ export default class implements Command {
.setColor(client.color),
],
});
const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
equalizer: [
{ band: 0, gain: Number(value) / 10 },
{ band: 1, gain: Number(value) / 10 },
{ band: 2, gain: Number(value) / 10 },
{ band: 3, gain: Number(value) / 10 },
{ band: 4, gain: Number(value) / 10 },
{ band: 5, gain: Number(value) / 10 },
{ band: 6, gain: Number(value) / 10 },
{ band: 7, gain: 0 },
{ band: 8, gain: 0 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0 },
{ band: 11, gain: 0 },
{ band: 12, gain: 0 },
{ band: 13, gain: 0 },
],
},
},
};
await player?.send(data);

player?.filter.setEqualizer([
{ band: 0, gain: Number(value) / 10 },
{ band: 1, gain: Number(value) / 10 },
{ band: 2, gain: Number(value) / 10 },
{ band: 3, gain: Number(value) / 10 },
{ band: 4, gain: Number(value) / 10 },
{ band: 5, gain: Number(value) / 10 },
{ band: 6, gain: Number(value) / 10 },
{ band: 7, gain: 0 },
{ band: 8, gain: 0 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0 },
{ band: 11, gain: 0 },
{ band: 12, gain: 0 },
{ band: 13, gain: 0 },
]);
player?.data.set("filter-mode", this.name[0]);

const embed = new EmbedBuilder()
Expand All @@ -122,7 +88,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
return handler.editReply({ content: " ", embeds: [embed] });
}
}
20 changes: 2 additions & 18 deletions src/commands/Filter/China.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,21 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
timescale: {
speed: 0.75,
pitch: 1.25,
rate: 1.25,
},
},
},
};

await player?.send(data);
player?.filter.set("china");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -61,7 +46,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [embed] });
}
}
20 changes: 2 additions & 18 deletions src/commands/Filter/Chipmunk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,21 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
timescale: {
speed: 1.05,
pitch: 1.35,
rate: 1.25,
},
},
},
};

await player?.send(data);
player?.filter.set("chimpunk");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -61,7 +46,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [embed] });
}
}
20 changes: 2 additions & 18 deletions src/commands/Filter/Darthvader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,21 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
timescale: {
speed: 0.975,
pitch: 0.5,
rate: 0.8,
},
},
},
};

await player?.send(data);
player?.filter.set("darthvader");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -61,7 +46,6 @@ export default class implements Command {
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [embed] });
}
}
36 changes: 2 additions & 34 deletions src/commands/Filter/Daycore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,36 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
equalizer: [
{ band: 0, gain: 0 },
{ band: 1, gain: 0 },
{ band: 2, gain: 0 },
{ band: 3, gain: 0 },
{ band: 4, gain: 0 },
{ band: 5, gain: 0 },
{ band: 6, gain: 0 },
{ band: 7, gain: 0 },
{ band: 8, gain: -0.25 },
{ band: 9, gain: -0.25 },
{ band: 10, gain: -0.25 },
{ band: 11, gain: -0.25 },
{ band: 12, gain: -0.25 },
{ band: 13, gain: -0.25 },
],
timescale: {
pitch: 0.63,
rate: 1.05,
},
},
},
};

await player?.send(data);
player?.filter.set("daycore");

const daycored = new EmbedBuilder()
.setDescription(
Expand All @@ -75,8 +45,6 @@ export default class implements Command {
})}`
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [daycored] });
}
}
19 changes: 2 additions & 17 deletions src/commands/Filter/Doubletime.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EmbedBuilder, Message } from "discord.js";
import delay from "delay";
import { EmbedBuilder } from "discord.js";
import { Manager } from "../../manager.js";
import { Accessableby, Command } from "../../structures/Command.js";
import { CommandHandler } from "../../structures/CommandHandler.js";
Expand Down Expand Up @@ -37,19 +36,7 @@ export default class implements Command {
});

player?.data.set("filter-mode", this.name[0]);

const data = {
guildId: handler.guild!.id,
playerOptions: {
filters: {
timescale: {
speed: 1.165,
},
},
},
};

await player?.send(data);
player?.filter.set("doubletime");

const embed = new EmbedBuilder()
.setDescription(
Expand All @@ -58,8 +45,6 @@ export default class implements Command {
})}`
)
.setColor(client.color);

await delay(2000);
await handler.editReply({ content: " ", embeds: [embed] });
}
}
Loading

0 comments on commit 1614cb3

Please sign in to comment.