Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix commands #223

Merged
merged 19 commits into from
Jul 22, 2022
Merged
2 changes: 1 addition & 1 deletion src/commands/Information/invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
const mainPage = new EmbedBuilder()
.setAuthor({ name: 'LavaMusic', iconURL: 'https://media.discordapp.net/attachments/876035356460462090/888434725235097610/20210820_124325.png' })
.setThumbnail('https://media.discordapp.net/attachments/876035356460462090/888434725235097610/20210820_124325.png')
.setColor('#303236')
.setColor(0x303236)
.addFields([{ name: 'invite lavamusic', value: `[Here](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=36768832&scope=applications.commands%20bot)` }])
message.reply({ embeds: [mainPage], components: [row] })
}
Expand Down
6 changes: 3 additions & 3 deletions src/commands/Music/filters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder } = require("discord.js");
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require("discord.js");

module.exports = {
name: "filters",
Expand All @@ -18,7 +18,7 @@ module.exports = {
const player = message.client.manager.get(message.guild.id);
if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({ embeds: [thing] });
}
Expand All @@ -27,7 +27,7 @@ module.exports = {
.setColor(client.embedColor)
.setDescription(`Choose what filter you want in the button`)

const but = new ButtonBuilder().setCustomId("clear_but").setLabel("Clear").setStyle("DANGER");
const but = new ButtonBuilder().setCustomId("clear_but").setLabel("Clear").setStyle(ButtonStyle.Danger);
const but2 = new ButtonBuilder().setCustomId("bass_but").setLabel("Bass").setStyle(ButtonStyle.Primary);
const but3 = new ButtonBuilder().setCustomId("night_but").setLabel("Night Core").setStyle(ButtonStyle.Primary);
const but4 = new ButtonBuilder().setCustomId("picth_but").setLabel("Pitch").setStyle(ButtonStyle.Primary);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Music/grab.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("#FFC942")
.setColor(0xFFC942)
.setDescription("> There is no music playing.");
return message.channel.send({embeds: [thing]});
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Music/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({ embeds: [thing] });
}
Expand All @@ -43,4 +43,4 @@ module.exports = {
.setDescription(`${emojiloop} Loop track is now **${trackRepeat}**`)
return message.reply({ embeds: [thing] });
}
};
};
6 changes: 3 additions & 3 deletions src/commands/Music/lyrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("Lavalink node is not connected"),
],
});
Expand All @@ -39,7 +39,7 @@ module.exports = {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There's nothing playing"),
],
});
Expand All @@ -60,7 +60,7 @@ module.exports = {
return message.channel.send({
embeds: [
new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(
`❌ | No lyrics found for ${search}!\nMake sure you typed in your search correctly.`
),
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Music/nowplaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ execute: async (message, args, client, prefix) => {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.channel.send(thing);
return message.channel.send({ embeds: [thing] });
}
const song = player.queue.current
const emojimusic = client.emoji.music;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Music/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -27,7 +27,7 @@ module.exports = {

if (player.paused) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`${emojipause} The player is already paused.`)
.setTimestamp()
return message.reply({embeds: [thing]});
Expand Down
6 changes: 3 additions & 3 deletions src/commands/Music/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -27,7 +27,7 @@ module.exports = {
if (position > player.queue.size) {
const number = (position + 1);
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`No songs at number ${number}.\nTotal Songs: ${player.queue.size}`);
return message.reply({embeds: [thing]});
}
Expand All @@ -44,4 +44,4 @@ module.exports = {
return message.reply({embeds: [thing]});

}
};
};
6 changes: 3 additions & 3 deletions src/commands/Music/resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -29,7 +29,7 @@ module.exports = {

if (!player.paused) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`${emojiresume} The player is already **resumed**.`)
.setTimestamp()
return message.reply({embeds: [thing]});
Expand All @@ -44,4 +44,4 @@ module.exports = {
return message.reply({embeds: [thing]});

}
};
};
6 changes: 3 additions & 3 deletions src/commands/Music/seek.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand Down Expand Up @@ -53,10 +53,10 @@ module.exports = {
}
} else {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`Seek duration exceeds Song duration.\nSong duration: \`${convertTime(duration)}\``);
return message.reply({embeds: [thing]});
}

}
};
};
4 changes: 2 additions & 2 deletions src/commands/Music/shuffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -33,4 +33,4 @@ module.exports = {
return message.reply({embeds: [thing]}).catch(error => client.logger.log(error, "error"));

}
};
};
4 changes: 2 additions & 2 deletions src/commands/Music/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ execute: async (message, args, client, prefix) => {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -37,4 +37,4 @@ execute: async (message, args, client, prefix) => {
})

}
};
};
4 changes: 2 additions & 2 deletions src/commands/Music/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red)
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -28,7 +28,7 @@ module.exports = {

if (!position || position < 0 || position > player.queue.size) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`Usage: ${message.client.prefix}skipto <Number of song in queue>`)
return message.reply({embeds: [thing]});
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Music/stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription("There is no music playing.");
return message.reply({embeds: [thing]});
}
Expand All @@ -40,4 +40,4 @@ module.exports = {
message.reply({embeds: [thing]});

}
};
};
8 changes: 4 additions & 4 deletions src/commands/Playlist/info.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder } = require("discord.js");
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require("discord.js");
const db = require("../../schema/playlist");
const { convertTime } = require("../../utils/convert.js");
const lodash = require("lodash");
Expand Down Expand Up @@ -37,11 +37,11 @@ module.exports = {
return await message.reply({ embeds: [embed] })
} else {

let previousbut = new ButtonBuilder().setCustomId("Previous").setEmoji("⏪").setStyle(ButtonStyle.Secondary);
let previousbut = new ButtonBuilder().setCustomId("Previous").setEmoji({ name: "⏪" }).setStyle(ButtonStyle.Secondary);

let nextbut = new ButtonBuilder().setCustomId("Next").setEmoji("⏩").setStyle(ButtonStyle.Secondary);
let nextbut = new ButtonBuilder().setCustomId("Next").setEmoji({ name: "⏩" }).setStyle(ButtonStyle.Secondary);

let stopbut = new ButtonBuilder().setCustomId("Stop").setEmoji("⏹️").setStyle(ButtonStyle.Secondary);
let stopbut = new ButtonBuilder().setCustomId("Stop").setEmoji({ name: "⏹️" }).setStyle(ButtonStyle.Secondary);

const row = new ActionRowBuilder().addComponents(previousbut, stopbut, nextbut);

Expand Down
8 changes: 4 additions & 4 deletions src/slashCommands/Playlist/info.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { EmbedBuilder, CommandInteraction, Client, ActionRowBuilder, ButtonBuilder, ApplicationCommandOptionType } = require("discord.js");
const { EmbedBuilder, CommandInteraction, Client, ActionRowBuilder, ButtonBuilder, ApplicationCommandOptionType, ButtonStyle } = require("discord.js");
const db = require("../../schema/playlist");
const { convertTime } = require("../../utils/convert.js");
const lodash = require("lodash");
Expand Down Expand Up @@ -49,11 +49,11 @@ module.exports = {
}
else {

let previousbut = new ButtonBuilder().setCustomId("Previous").setEmoji("⏪").setStyle("SECONDARY");
let previousbut = new ButtonBuilder().setCustomId("Previous").setEmoji({ name: "⏪" }).setStyle(ButtonStyle.Secondary);

let nextbut = new ButtonBuilder().setCustomId("Next").setEmoji("⏩").setStyle("SECONDARY");
let nextbut = new ButtonBuilder().setCustomId("Next").setEmoji({ name: "⏩" }).setStyle(ButtonStyle.Secondary);

let stopbut = new ButtonBuilder().setCustomId("Stop").setEmoji("⏹️").setStyle("SECONDARY");
let stopbut = new ButtonBuilder().setCustomId("Stop").setEmoji({ name: "⏹️" }).setStyle(ButtonStyle.Secondary);

const row = new ActionRowBuilder().addComponents(previousbut, stopbut, nextbut);

Expand Down
4 changes: 2 additions & 2 deletions src/slashCommands/Playlist/savecurrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = {
const player = client.manager.players.get(interaction.guildId);
if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setDescription(i18n.__("player.nomusic"));
.setColor("Red")
.setDescription('Nothing is playing right now.')
return interaction.editReply({ embeds: [thing] });
}
if (!data) {
Expand Down
2 changes: 1 addition & 1 deletion src/slashCommands/Playlist/savequeue.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
const player = client.manager.players.get(interaction.guildId);
if (!player.queue.current) {
let thing = new EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setDescription(`Currently No Music Is Playing.`);
return interaction.editReply({ embeds: [thing] });
}
Expand Down