Skip to content

Commit

Permalink
[Enhancement] replaced error messages hex color
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 15, 2021
1 parent 81c28a0 commit eb22f54
Show file tree
Hide file tree
Showing 24 changed files with 147 additions and 200 deletions.
18 changes: 8 additions & 10 deletions commands/Misc/nickname.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ module.exports = {

if (!args[0])
return await message.channel.send({
embeds: [
embedMessage("#9dcc37", `❌ You did not give me any nickname`),
],
embeds: [embedMessage("RED", `❌ You did not give me any nickname`)],
});

if (
Expand All @@ -42,7 +40,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ Could not change your nickname, maybe you are the owner?\n Error: ${error.message}`
),
],
Expand All @@ -59,7 +57,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ Could not find User, either he does not exist or you did not mention him`
),
],
Expand All @@ -83,7 +81,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ I do not have permission to change other member's nicknames who have the same role as me or higher!`
),
],
Expand All @@ -99,7 +97,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ You do not have permission to change ${user.toString()} nickname!`
),
],
Expand Down Expand Up @@ -133,7 +131,7 @@ module.exports = {
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ You do not have permission to change ${user.toString()} nickname!`
),
],
Expand All @@ -159,7 +157,7 @@ module.exports = {
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ I do not have permission to change other member's nicknames who have the same role as me or higher!`
),
],
Expand All @@ -185,7 +183,7 @@ module.exports = {
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
"RED",
` ❌ I do not have permission to change your nickname!\n maybe your role is higher than mine or perhaps you are the owner ?`
),
],
Expand Down
6 changes: 3 additions & 3 deletions commands/Misc/perms.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ I was not able to resolve this user, please mention the user!`
),
],
Expand Down Expand Up @@ -61,7 +61,7 @@ module.exports = {
await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ | Ups! Looks like I do not have permission to list the roles or something else went wrong!`
),
],
Expand Down Expand Up @@ -112,7 +112,7 @@ module.exports = {
await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ | Ups! Looks like I do not have permission to list the roles or something else went wrong!`
),
],
Expand Down
26 changes: 10 additions & 16 deletions commands/Misc/summon.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ module.exports = {
if (!args[0])
return await message.channel.send({
embeds: [
embedMessage("#9dcc37", `You have to mention a user to summon!`),
embedMessage("RED", `❌ | You have to mention a user to summon!`),
],
});

if (!message.member.permissions.has("MOVE_MEMBERS"))
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
`❌ | You have no permission to summon users!`
),
embedMessage("RED", `❌ | You have no permission to summon users!`),
],
});

Expand All @@ -33,8 +30,8 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
`I could not resolve the user, please make sure to mention the user!`
"RED",
`❌ | I could not resolve the user, please make sure to mention the user!`
),
],
});
Expand All @@ -43,8 +40,8 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
`${user.toString()} is not connected to any voice channel!`
"RED",
`❌ | ${user.toString()} is not connected to any voice channel!`
),
],
});
Expand All @@ -64,7 +61,7 @@ module.exports = {
} catch (err) {
client.logger(err.message, "error");
return await message.channel.send(
`Something went wrong, I could not summon this user!`
`❌ | Something went wrong, I could not summon this user!`
);
}
},
Expand All @@ -83,19 +80,16 @@ module.exports = {
if (!interaction.member.permissions.has([Permissions.FLAGS.MOVE_MEMBERS]))
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
`❌ | You have no permission to summon users!`
),
embedMessage("RED", `❌ | You have no permission to summon users!`),
],
});

if (!user.voice.channelId)
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
`${user.toString()} is not connected to any voice channel!`
"RED",
`❌ | ${user.toString()} is not connected to any voice channel!`
),
],
});
Expand Down
18 changes: 9 additions & 9 deletions commands/Music/247.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ | Please specify whether you want to on/off the 24/7 Mode, see ${prefix}h 247 for more info about this command`
),
],
Expand Down Expand Up @@ -46,7 +46,7 @@ module.exports = {
}
return;
}

if (source === "youtube") {
const validateSP = playdl.sp_validate(track.url);
const spotifyList = ["track", "album", "playlist"];
Expand All @@ -60,7 +60,7 @@ module.exports = {
});
return (await playdl.stream(youtube[0].url)).stream;
}

return (await playdl.stream(track.url)).stream;
}
},
Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = {
}
return;
}

if (source === "youtube") {
const validateSP = playdl.sp_validate(track.url);
const spotifyList = ["track", "album", "playlist"];
Expand All @@ -110,7 +110,7 @@ module.exports = {
});
return (await playdl.stream(youtube[0].url)).stream;
}

return (await playdl.stream(track.url)).stream;
}
},
Expand Down Expand Up @@ -192,7 +192,7 @@ module.exports = {
}
return;
}

if (source === "youtube") {
const validateSP = playdl.sp_validate(track.url);
const spotifyList = ["track", "album", "playlist"];
Expand All @@ -206,7 +206,7 @@ module.exports = {
});
return (await playdl.stream(youtube[0].url)).stream;
}

return (await playdl.stream(track.url)).stream;
}
},
Expand Down Expand Up @@ -239,7 +239,7 @@ module.exports = {
}
return;
}

if (source === "youtube") {
const validateSP = playdl.sp_validate(track.url);
const spotifyList = ["track", "album", "playlist"];
Expand All @@ -253,7 +253,7 @@ module.exports = {
});
return (await playdl.stream(youtube[0].url)).stream;
}

return (await playdl.stream(track.url)).stream;
}
},
Expand Down
10 changes: 4 additions & 6 deletions commands/Music/8D.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ | Your Queue is empty, Make sure to play a song first`
),
],
Expand All @@ -24,7 +24,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ | Please provide whether you want to on/off the filter, see ${prefix}h 8d for more info about this command`
),
],
Expand All @@ -42,7 +42,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send({
embeds: [embedMessage("#9dcc37", `❌ | Could not set the Filter`)],
embeds: [embedMessage("RED", `❌ | Could not set the Filter`)],
});
}
break;
Expand All @@ -55,9 +55,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send({
embeds: [
embedMessage("#9dcc37", `❌ | Could not disable the filter`),
],
embeds: [embedMessage("RED", `❌ | Could not disable the filter`)],
});
}
break;
Expand Down
10 changes: 5 additions & 5 deletions commands/Music/back.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
`#9dcc37`,
`RED`,
`❌ | No Queue has been created for this guild. <Queue is empty>`
),
],
});

if (!queue.playing)
return await message.channel.send({
embeds: [embedMessage(`#9dcc37`, `❌ | There is nothing playing!`)],
embeds: [embedMessage(`RED`, `❌ | There is nothing playing!`)],
});

try {
Expand All @@ -37,7 +37,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send({
embeds: [embedMessage("#9dcc37", "❌ Could not find previous track")],
embeds: [embedMessage("RED", "❌ Could not find previous track")],
});
}
},
Expand All @@ -53,7 +53,7 @@ module.exports = {
return await interaction.followUp({
embeds: [
embedMessage(
`#9dcc37`,
`RED`,
`❌ | No Queue has been created for this guild. <Queue is empty>`
),
],
Expand All @@ -79,7 +79,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await interaction.followUp({
embeds: [embedMessage("#9dcc37", "❌ Could not find previous track")],
embeds: [embedMessage("RED", "❌ Could not find previous track")],
});
}
},
Expand Down
4 changes: 2 additions & 2 deletions commands/Music/bassboost.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ Your Queue is empty, Make sure to play a song first`
),
],
Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = {
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
"RED",
`❌ Your Queue is empty, Make sure to play a song first`
),
],
Expand Down
Loading

0 comments on commit eb22f54

Please sign in to comment.