Skip to content

Commit

Permalink
chore: added back setup system
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Sep 14, 2024
1 parent ab21f02 commit af71145
Show file tree
Hide file tree
Showing 30 changed files with 898 additions and 131 deletions.
3 changes: 3 additions & 0 deletions locales/ChineseCN.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | 低音增强滤镜已`启用`。\n**请注意,音量过大会损害您的听力!**",
"filter_disabled": "`✅` | 低音增强滤镜已`禁用`。"
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/ChineseTW.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | 低音增強等化器已`啟用`。\n**請注意,音量過大會損害您的聽力!**",
"filter_disabled": "`✅` | 低音增強等化器已`停用`。"
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
9 changes: 7 additions & 2 deletions locales/EnglishUS.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,14 @@
},
"bassboost": {
"description": "on/off bassboost filter",
"options": {
"level": "The bassboost level you want to set"
},
"messages": {
"filter_enabled": "`✅` | Bassboost filter has been `ENABLED`. \n**Be careful, listening too loudly can damage your hearing!**",
"filter_disabled": "`✅` | Bassboost filter has been `DISABLED`."
"high": "`✅` | High bassboost filter has been `ENABLED`.",
"low": "`✅` | Low bassboost filter has been `ENABLED`.",
"medium": "`✅` | Medium bassboost filter has been `ENABLED`.",
"off": "`✅` | Bassboost filter has been `DISABLED`."
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/French.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"messages": {
"filter_enabled": "`✅` | Le filtre de basses a été `ACTIVÉ`. \n**Attention, écouter trop fort peut endommager votre audition !**",
"filter_disabled": "`✅` | Le filtre de basses a été `DÉSACTIVÉ`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/German.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"messages": {
"filter_enabled": "`✅` | Bassboost-Filter wurde `AKTIVIERT`. \n**Vorsicht, zu lautes Hören kann deine Ohren schädigen!**",
"filter_disabled": "`✅` | Bassboost-Filter wurde `DEAKTIVIERT`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Hindi.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Bassboost filter `SAKRIYA` kar diya gaya hai. \n**Savdhan rahein, tej awaz mein sunne se aapke kaano ko nuksan pahunch sakta hai!**",
"filter_disabled": "`✅` | Bassboost filter `NIRAKRIYA` kar diya gaya hai."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Indonesian.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Filter bassboost telah `DIAKTIFKAN`. \n**Hati-hati, mendengarkan terlalu keras dapat merusak pendengaran Anda!**",
"filter_disabled": "`✅` | Filter bassboost telah `DINONAKTIFKAN`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Japanese.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | ベースブーストフィルターが`有効`になりました。\n**音量を上げすぎると聴覚に悪影響を与える可能性があるので注意してください!**",
"filter_disabled": "`✅` | ベースブーストフィルターが`無効`になりました。"
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
7 changes: 5 additions & 2 deletions locales/Korean.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
"messages": {
"filter_enabled": "`✅` | 베이스부스트 필터가 `활성화되었어요`. \n**조심하세요, 너무 크게 들으면 귀가 나갈 수도 있어요!**",
"filter_disabled": "`✅` | 베이스부스트 필터가 `비활성화되었어요`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down Expand Up @@ -551,8 +554,8 @@
"error_searching": "노래를 검색하는 도중 오류가 발생했어요.",
"no_results": "검색결과가 없어요.",
"nothing_playing": "재생 중인 노래 없음",
"queue_too_long": "대기열에 노래가 너무 많아요. 노래는 최대 {maxQueueSize}개까지만 추가할 수 있어요.",
"playlist_too_long": "플레이리스트 또는 대기열에 노래가 너무 많아요. 노래는 최대 {maxPlaylistSize}개까지만 추가할 수 있어요.",
"queue_too_long": "대기열에 노래가 너무 많아요. 노래는 최대 {maxQueueSize}개까지만 추가할 수 있어요.",
"playlist_too_long": "플레이리스트 또는 대기열에 노래가 너무 많아요. 노래는 최대 {maxPlaylistSize}개까지만 추가할 수 있어요.",
"added_to_queue": "대기열에 추가되었어요: [{title}]({uri})",
"added_playlist_to_queue": "[{length}]개의 노래가 추가되었어요."
}
Expand Down
3 changes: 3 additions & 0 deletions locales/Norwegian.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Bassboost-filteret er `AKTIVERT`. \n**Vær forsiktig, å lytte for høyt kan skade hørselen!**",
"filter_disabled": "`✅` | Bassboost-filteret er `DEAKTIVERT`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Polish.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Filtr wzmocnienia basów został `WŁĄCZONY`. \n**Uwaga, zbyt głośne słuchanie może uszkodzić słuch!**",
"filter_disabled": "`✅` | Filtr wzmocnienia basów został `WYŁĄCZONY`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Russian.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Фильтр усиления басов был `ВКЛЮЧЕН`. \n**Будьте осторожны, слишком громкое прослушивание может повредить слух!**",
"filter_disabled": "`✅` | Фильтр усиления басов был `ОТКЛЮЧЕН`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/SpanishES.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"messages": {
"filter_enabled": "`✅` | El filtro de refuerzo de graves se ha `ACTIVADO`. \n**¡Ten cuidado, escuchar demasiado alto puede dañar tu oído!**",
"filter_disabled": "`✅` | El filtro de refuerzo de graves se ha `DESACTIVADO`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
3 changes: 3 additions & 0 deletions locales/Vietnamese.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
"messages": {
"filter_enabled": "`✅` | Bộ lọc Bassboost đã được `BẬT`. \n**Cẩn thận, nghe quá to có thể gây hại cho thính giác của bạn!**",
"filter_disabled": "`✅` | Bộ lọc Bassboost đã được `TẮT`."
},
"options": {
"level": "The bassboost level you want to set"
}
},
"distorsion": {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/Setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class Setup extends Command {
const player = this.client.manager.getPlayer(ctx.guild!.id);
const image = this.client.config.links.img;
const desc =
player.queue.current
player && player.queue.current
? `[${player.queue.current.info.title}](${player.queue.current.info.uri})`
: ctx.locale("player.setupStart.nothing_playing");
embed.setDescription(desc).setImage(image);
Expand Down Expand Up @@ -129,7 +129,7 @@ export default class Setup extends Command {
}
client.db.deleteSetup(ctx.guild!.id);
const textChannel = ctx.guild.channels.cache.get(data2.textId);
if (textChannel) await textChannel.delete().catch(() => { });
if (textChannel) await textChannel.delete().catch(() => {});
await ctx.sendMessage({
embeds: [
{
Expand Down
70 changes: 70 additions & 0 deletions src/commands/filters/8d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { Command, type Context, type Lavamusic } from "../../structures/index.js";

export default class _8d extends Command {
constructor(client: Lavamusic) {
super(client, {
name: "8d",
description: {
content: "cmd.8d.description",
examples: ["8d"],
usage: "8d",
},
category: "filters",
aliases: ["3d"],
cooldown: 3,
args: false,
vote: false,
player: {
voice: true,
dj: true,
active: true,
djPerm: null,
},
permissions: {
dev: false,
client: ["SendMessages", "ReadMessageHistory", "ViewChannel", "EmbedLinks"],
user: [],
},
slashCommand: true,
options: [],
});
}

public async run(client: Lavamusic, ctx: Context): Promise<any> {
const player = client.manager.getPlayer(ctx.guild!.id);
const filterEnabled = player.filterManager.filters.rotation;

if (filterEnabled) {
await player.filterManager.toggleRotation();
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.8d.messages.filter_disabled"),
color: this.client.color.main,
},
],
});
} else {
await player.filterManager.toggleRotation(0.2);
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.8d.messages.filter_enabled"),
color: this.client.color.main,
},
],
});
}
}
}

/**
* Project: lavamusic
* Author: Appu
* Main Contributor: LucasB25
* Company: Coders
* Copyright (c) 2024. All rights reserved.
* This code is the property of Coder and may not be reproduced or
* modified without permission. For more information, contact us at
* https://discord.gg/ns8CTk9J3e
*/
109 changes: 109 additions & 0 deletions src/commands/filters/BassBoost.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import { ApplicationCommandOptionType } from "discord.js";
import { EQList } from "lavalink-client";
import { Command, type Context, type Lavamusic } from "../../structures/index.js";

export default class BassBoost extends Command {
constructor(client: Lavamusic) {
super(client, {
name: "bassboost",
description: {
content: "cmd.bassboost.description",
examples: ["bassboost high", "bassboost medium", "bassboost low", "bassboost off"],
usage: "bassboost [level]",
},
category: "filters",
aliases: ["bb"],
cooldown: 3,
args: true,
vote: false,
player: {
voice: true,
dj: true,
active: true,
djPerm: null,
},
permissions: {
dev: false,
client: ["SendMessages", "ReadMessageHistory", "ViewChannel", "EmbedLinks"],
user: [],
},
slashCommand: true,
options: [
{
name: "level",
description: "cmd.bassboost.options.level",
type: ApplicationCommandOptionType.String,
required: true,
choices: [
{ name: "high", value: "high" },
{ name: "medium", value: "medium" },
{ name: "low", value: "low" },
{ name: "off", value: "off" },
],
},
],
});
}

public async run(client: Lavamusic, ctx: Context): Promise<any> {
const player = client.manager.getPlayer(ctx.guild!.id);

switch (ctx.args[0]?.toLowerCase()) {
case "high":
await player.filterManager.setEQ(EQList.BassboostHigh);
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.bassboost.messages.high"),
color: this.client.color.main,
},
],
});
break;
case "medium":
await player.filterManager.setEQ(EQList.BassboostMedium);
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.bassboost.messages.medium"),
color: this.client.color.main,
},
],
});
break;
case "low":
await player.filterManager.setEQ(EQList.BassboostLow);
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.bassboost.messages.low"),
color: this.client.color.main,
},
],
});
break;
case "off":
await player.filterManager.clearEQ();
await ctx.sendMessage({
embeds: [
{
description: ctx.locale("cmd.bassboost.messages.off"),
color: this.client.color.main,
},
],
});
break;
}
}
}

/**
* Project: lavamusic
* Author: Appu
* Main Contributor: LucasB25
* Company: Coders
* Copyright (c) 2024. All rights reserved.
* This code is the property of Coder and may not be reproduced or
* modified without permission. For more information, contact us at
* https://discord.gg/ns8CTk9J3e
*/
Loading

0 comments on commit af71145

Please sign in to comment.