Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit c042de7

Browse files
author
Catalin Ta
committed
📌 chore: ui fix
1 parent f5d42a0 commit c042de7

File tree

5 files changed

+79
-2
lines changed

5 files changed

+79
-2
lines changed

commands/player/pause.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const Command = require('../../structures/CommandClass');
2+
const { SlashCommandBuilder } = require('discord.js');
3+
4+
const { Player } = require('discord-player');
5+
6+
module.exports = class Pause extends Command {
7+
constructor(client) {
8+
super(client, {
9+
data: new SlashCommandBuilder()
10+
.setName('pause')
11+
.setDescription('Pauses the current track')
12+
.setDMPermission(false),
13+
usage: 'resume',
14+
category: 'Player',
15+
permissions: ['Use Application Commands', 'Send Messages', 'Embed Links'],
16+
});
17+
}
18+
async run(client, interaction) {
19+
const player = Player.singleton();
20+
const queue = player.nodes.get(interaction.guild.id);
21+
22+
if (!queue || !queue.isPlaying()) {
23+
return await interaction.reply('<:red_emoji:1126936340022435963> There isn\'t currently any music playing.');
24+
}
25+
26+
queue.node.setPaused(!queue.node.isPaused());
27+
return await interaction.reply(`<:green_emoji:1126936345043030026> Successfully ${queue.node.isPaused() === true ? 'paused' : 'unpaused'} **${queue.currentTrack.title}**.`);
28+
}
29+
};

commands/player/resume.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const Command = require('../../structures/CommandClass');
2+
const { SlashCommandBuilder } = require('discord.js');
3+
4+
const { Player } = require('discord-player');
5+
6+
module.exports = class Resume extends Command {
7+
constructor(client) {
8+
super(client, {
9+
data: new SlashCommandBuilder()
10+
.setName('resume')
11+
.setDescription('Resumes the current track')
12+
.setDMPermission(false),
13+
usage: 'resume',
14+
category: 'Player',
15+
permissions: ['Use Application Commands', 'Send Messages', 'Embed Links'],
16+
});
17+
}
18+
async run(client, interaction) {
19+
const player = Player.singleton();
20+
const queue = player.nodes.get(interaction.guild.id);
21+
22+
if (!queue || !queue.isPlaying()) {
23+
return await interaction.reply('<:red_emoji:1126936340022435963> There isn\'t currently any music playing.');
24+
}
25+
26+
if (!queue.node.isPaused()) {
27+
return await interaction.reply('<:red_emoji:1126936340022435963> The queue isn\'t currently paused.');
28+
}
29+
30+
queue.node.setPaused(false);
31+
return await interaction.reply(`<:green_emoji:1126936345043030026> Successfully unpaused **${queue.currentTrack.title}**.`);
32+
}
33+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = class Prefix extends Command {
1010
.setDescription('Sets a new bot prefix by filling out the modal')
1111
.setDMPermission(false),
1212
usage: 'prefix',
13-
category: 'Settings',
13+
category: 'Utils',
1414
permissions: ['Use Application Commands', 'Send Messages', 'Embed Links', 'Manage Guild'],
1515
});
1616
}

package-lock.json

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"ejs": "^3.1.9",
4141
"express": "^4.18.2",
4242
"express-session": "^1.17.3",
43+
"ffmpeg": "^0.0.4",
4344
"ffmpeg-static": "^5.2.0",
4445
"figlet": "^1.7.0",
4546
"mongoose": "^7.6.5",

0 commit comments

Comments
 (0)