Skip to content

Commit

Permalink
Merge pull request #51 from RainyXeon/dev
Browse files Browse the repository at this point in the history
Apply new language package [RSLP]
  • Loading branch information
RainyXeon authored Feb 18, 2024
2 parents 727f8d5 + b2865ca commit f65d90f
Show file tree
Hide file tree
Showing 146 changed files with 1,147 additions and 1,139 deletions.
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
lavalink:
image: ghcr.io/lavalink-devs/lavalink:4-alpine
container_name: lavalink
user: root
restart: unless-stopped
environment:
- SERVER_PORT=2333
Expand All @@ -23,20 +24,22 @@ services:
ports:
- 27017:27017
image: mongo:latest
user: root
environment:
MONGO_INITDB_ROOT_USERNAME: byteblaze
MONGO_INITDB_ROOT_PASSWORD: cylane
restart: on-failure
networks:
- mongodb-net
volumes:
- mongodb_data:/data/db
- ./mongodb_data:/data/db
hostname: mongodb

byteblaze:
build: .
image: byteblaze:latest
container_name: byteblaze
user: root
restart: unless-stopped
networks:
- lavalink
Expand All @@ -48,7 +51,7 @@ services:
- DOCKER_COMPOSE_DATABASE=true
- DOCKER_COMPOSE_MODE=true
# Database
- MONGO_URI=mongodb://byteblaze:cylane@mongodb:27017/streamhatchet?directConnection=true&authSource=admin&replicaSet=replicaset&retryWrites=true
- MONGO_URI=mongodb://byteblaze:cylane@mongodb:27017/production?directConnection=true&authSource=admin&replicaSet=replicaset&retryWrites=true
# Lavalink
- NODE_URL=lavalink:2333
- NODE_AUTH=youshallnotpass
Expand All @@ -60,3 +63,4 @@ networks:

volumes:
mongodb_data:
external: true
2 changes: 1 addition & 1 deletion src/buttons/Clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class implements PlayerButton {
new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "player", "clear_msg")}`
`${client.i18n.get(language, "button.music", "clear_msg")}`
);

return;
Expand Down
6 changes: 3 additions & 3 deletions src/buttons/Loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class implements PlayerButton {
new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "loop_current")}`
`${client.i18n.get(language, "button.music", "loop_current")}`
);

break;
Expand All @@ -55,7 +55,7 @@ export default class implements PlayerButton {
new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "loop_all")}`
`${client.i18n.get(language, "button.music", "loop_all")}`
);

break;
Expand All @@ -68,7 +68,7 @@ export default class implements PlayerButton {
new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "unloop_all")}`
`${client.i18n.get(language, "button.music", "unloop_all")}`
);

break;
Expand Down
2 changes: 1 addition & 1 deletion src/buttons/Pause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class implements PlayerButton {
message,
`${client.i18n.get(
language,
"player",
"button.music",
newPlayer.paused ? "pause_msg" : "resume_msg"
)}`
);
Expand Down
4 changes: 2 additions & 2 deletions src/buttons/Previous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export default class implements PlayerButton {
return await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "previous_notfound")}`
`${client.i18n.get(language, "button.music", "previous_notfound")}`
);

player.previous();

await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "previous_msg")}`
`${client.i18n.get(language, "button.music", "previous_msg")}`
);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/buttons/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export default class implements PlayerButton {

const embed = new EmbedBuilder()
.setAuthor({
name: `${client.i18n.get(language, "player", "queue_author", {
name: `${client.i18n.get(language, "button.music", "queue_author", {
guild: message.guild!.name,
})}`,
})
.setThumbnail(thumbnail)
.setColor(client.color)
.setDescription(
`${client.i18n.get(language, "player", "queue_description", {
`${client.i18n.get(language, "button.music", "queue_description", {
track: song!.title,
track_url: String(song!.uri),
duration: new FormatDuration().parse(song?.length),
Expand All @@ -66,7 +66,7 @@ export default class implements PlayerButton {
})}`
)
.setFooter({
text: `${client.i18n.get(language, "player", "queue_footer", {
text: `${client.i18n.get(language, "button.music", "queue_footer", {
page: `${i + 1}`,
pages: `${pagesNum}`,
queue_lang: `${player.queue.length}`,
Expand Down
6 changes: 3 additions & 3 deletions src/buttons/Shuffle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export default class implements PlayerButton {
.setThumbnail(thumbnail)
.setColor(client.color)
.setAuthor({
name: `${client.i18n.get(language, "music", "shuffle_msg")}`,
name: `${client.i18n.get(language, "button.music", "shuffle_msg")}`,
})
.setDescription(
`${client.i18n.get(language, "player", "queue_description", {
`${client.i18n.get(language, "button.music", "queue_description", {
track: song!.title,
track_url: String(song!.uri),
duration: new FormatDuration().parse(song?.length),
Expand All @@ -68,7 +68,7 @@ export default class implements PlayerButton {
})}`
)
.setFooter({
text: `${client.i18n.get(language, "player", "queue_footer", {
text: `${client.i18n.get(language, "button.music", "queue_footer", {
page: `${i + 1}`,
pages: `${pagesNum}`,
queue_lang: `${newQueue.length}`,
Expand Down
4 changes: 2 additions & 2 deletions src/buttons/Skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class implements PlayerButton {
return await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "skip_notfound")}`
`${client.i18n.get(language, "button.music", "skip_notfound")}`
);

player.skip();
Expand All @@ -37,7 +37,7 @@ export default class implements PlayerButton {
await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "player", "skip_msg")}`
`${client.i18n.get(language, "button.music", "skip_msg")}`
);
}
}
6 changes: 2 additions & 4 deletions src/buttons/Stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ export default class implements PlayerButton {
nplaying: Message<boolean>,
collector: InteractionCollector<ButtonInteraction<"cached">>
): Promise<any> {
if (!player) {
return collector.stop();
}
collector.stop();

player.data.set("sudo-destroy", true);
player.destroy();

await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "player", "stop_msg")}`
`${client.i18n.get(language, "button.music", "stop_msg")}`
);
}
}
13 changes: 9 additions & 4 deletions src/buttons/VolumeDown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ export default class implements PlayerButton {
collector.stop();
}

const reply_msg = `${client.i18n.get(language, "player", "voldown_msg", {
volume: `${player.volume * 100 - 10}`,
})}`;
const reply_msg = `${client.i18n.get(
language,
"button.music",
"voldown_msg",
{
volume: `${player.volume * 100 - 10}`,
}
)}`;

if (player.volume <= 0.1) {
await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "volume_invalid")}`
`${client.i18n.get(language, "button.music", "volume_invalid")}`
);
return;
}
Expand Down
13 changes: 9 additions & 4 deletions src/buttons/VolumeUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ export default class implements PlayerButton {
collector.stop();
}

const reply_msg = `${client.i18n.get(language, "player", "volup_msg", {
volume: `${player.volume * 100 + 10}`,
})}`;
const reply_msg = `${client.i18n.get(
language,
"button.music",
"volup_msg",
{
volume: `${player.volume * 100 + 10}`,
}
)}`;

if (player.volume * 100 >= 100) {
await new ReplyInteractionService(
client,
message,
`${client.i18n.get(language, "music", "volume_invalid")}`
`${client.i18n.get(language, "button.music", "volume_invalid")}`
);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/3D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand All @@ -55,7 +55,7 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/Bass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand Down Expand Up @@ -70,7 +70,7 @@ export default class implements Command {

const bassed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
17 changes: 11 additions & 6 deletions src/commands/Filter/Bassboost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class implements Command {
embeds: [
new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_number")}`
`${client.i18n.get(handler.language, "command.filter", "filter_number")}`
)
.setColor(client.color),
],
Expand Down Expand Up @@ -74,7 +74,7 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: "Bassboost",
})}`
)
Expand All @@ -91,7 +91,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"bassboost_limit"
)}`
)
Expand Down Expand Up @@ -127,9 +127,14 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "bassboost_set", {
amount: value,
})}`
`${client.i18n.get(
handler.language,
"command.filter",
"bassboost_set",
{
amount: value,
}
)}`
)
.setColor(client.color);

Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/China.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand Down Expand Up @@ -59,7 +59,7 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/Chipmunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand Down Expand Up @@ -59,7 +59,7 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/Darthvader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand Down Expand Up @@ -59,7 +59,7 @@ export default class implements Command {

const embed = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Filter/Daycore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class implements Command {
.setDescription(
`${client.i18n.get(
handler.language,
"filters",
"command.filter",
"filter_already",
{
name: this.name[0],
Expand Down Expand Up @@ -74,7 +74,7 @@ export default class implements Command {

const daycored = new EmbedBuilder()
.setDescription(
`${client.i18n.get(handler.language, "filters", "filter_on", {
`${client.i18n.get(handler.language, "command.filter", "filter_on", {
name: this.name[0],
})}`
)
Expand Down
Loading

0 comments on commit f65d90f

Please sign in to comment.