Skip to content

Commit

Permalink
Playlist: Increase limit on name's length
Browse files Browse the repository at this point in the history
  • Loading branch information
nfsmaniac committed Nov 7, 2022
1 parent 5b72bf0 commit 2e8f200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/commands/Playlist/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module.exports = {
return message.reply({ embeds: [new EmbedBuilder().setColor(color).setDescription("Provide a playlist name.")] });
};

if (Name.length > 10) {
return message.reply({ embeds: [new EmbedBuilder().setColor(color).setDescription("Playlist name can't be greater than \`10\` characters.")] });
if (Name.length > 100) {
return message.reply({ embeds: [new EmbedBuilder().setColor(color).setDescription("Playlist name can't be greater than \`100\` characters.")] });
};
let data = await db.find({
UserId: message.author.id,
Expand All @@ -36,7 +36,7 @@ module.exports = {
UserId: message.author.id
});
if (userData.length >= 10) {
return message.reply({ embeds: [new EmbedBuilder().setColor(color).setDescription(`You can only create \`10\` playlists.`)] })
return message.reply({ embeds: [new EmbedBuilder().setColor(color).setDescription(`You can only create up to \`10\` playlists.`)] })
}

const newData = new db({
Expand Down
6 changes: 3 additions & 3 deletions src/slashCommands/Playlist/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module.exports = {
const Name = interaction.options.getString("name").replace(/_/g, ' ');
const data = await db.find({ UserId: interaction.member.user.id, PlaylistName: Name });

if (Name.length > 10) {
return interaction.editReply({ embeds: [new EmbedBuilder().setColor(client.embedColor).setDescription(`Playlist name can't be greater than 10 characters.`)] });
if (Name.length > 100) {
return interaction.editReply({ embeds: [new EmbedBuilder().setColor(client.embedColor).setDescription(`Playlist name can't be greater than \`100\` characters.`)] });

};
if (data.length > 0) {
Expand All @@ -39,7 +39,7 @@ module.exports = {
UserId: interaction.user.id
});
if (userData.length >= 10) {
return interaction.editReply({ embeds: [new EmbedBuilder().setColor(client.embedColor).setDescription(`You can only create 10 playlists.`)] })
return interaction.editReply({ embeds: [new EmbedBuilder().setColor(client.embedColor).setDescription(`You can only create up to \`10\` playlists.`)] })
}
const newData = new db({
UserName: interaction.user.tag,
Expand Down

0 comments on commit 2e8f200

Please sign in to comment.