Skip to content

Commit

Permalink
[Enhancement] embed message improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 3, 2021
1 parent 8a63daf commit 354b285
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 66 deletions.
8 changes: 4 additions & 4 deletions commands/Admin/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`You have to be connected to the voice channel to use this commnad\n see /regionbyid instead!`
`You have to be connected to the voice channel to use this commnad\n see /regionbyid instead!`
),
],
});
Expand All @@ -51,7 +51,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`${interaction.member.toString()} You do not have permssion to edit the region of channels!`
`${interaction.member.toString()} You do not have permssion to edit the region of channels!`
),
],
});
Expand All @@ -63,7 +63,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Region of ${voiceChannel.toString()} has been changed from ${currentRtc} to ${
`Region of ${voiceChannel.toString()} has been changed from ${currentRtc} to ${
voiceChannel.rtcRegion
}`
),
Expand All @@ -75,7 +75,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Could not change the region of this channel!`
`Could not change the region of this channel!`
),
],
});
Expand Down
8 changes: 4 additions & 4 deletions commands/Admin/regionById.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`A voice channel with this id does not exist!`
`A voice channel with this id does not exist!`
),
],
});
Expand All @@ -57,7 +57,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`${interaction.member.toString()} You do not have permssion to edit the region of channels!`
`${interaction.member.toString()} You do not have permssion to edit the region of channels!`
),
],
});
Expand All @@ -69,7 +69,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Region of ${voiceChannel.toString()} has been changed from ${currentRtc} to ${
`Region of ${voiceChannel.toString()} has been changed from ${currentRtc} to ${
voiceChannel.rtcRegion
}`
),
Expand All @@ -81,7 +81,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Could not change the region of this channel!`
`Could not change the region of this channel!`
),
],
});
Expand Down
8 changes: 5 additions & 3 deletions commands/Anime/searchAnime.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ module.exports = {
const searchString = args.join(" ");
if (!searchString)
return await message.channel.send({
embeds: [embedMessage("#9dcc37", "You have to provide an anime name!")],
embeds: [
embedMessage("#9dcc37", "❌ You have to provide an anime name!"),
],
});
try {
const Anime = await getAnimeInfo(searchString);
Expand Down Expand Up @@ -73,7 +75,7 @@ module.exports = {
await message.channel.send({ embeds: [animeEmbed] });
} catch (err) {
await message.channel.send({
embeds: [embedMessage("#9dcc37", `Could not find this Anime, Sry!`)],
embeds: [embedMessage("#9dcc37", `Could not find this Anime, Sry!`)],
});
logger(err.message, "error");
console.error(err);
Expand Down Expand Up @@ -150,7 +152,7 @@ module.exports = {
await interaction.followUp({ embeds: [animeEmbed] });
} catch (err) {
await interaction.followUp({
embeds: [embedMessage("#9dcc37", `Could not find this Anime, Sry!`)],
embeds: [embedMessage("#9dcc37", `Could not find this Anime, Sry!`)],
});
logger(err.message, "error");
console.error(err);
Expand Down
4 changes: 2 additions & 2 deletions commands/Anime/whatAnime.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send(
`${interaction.user.toString()}, There was an error processing this image!`
`${interaction.user.toString()}, There was an error processing this image!`
);
}
},
Expand Down Expand Up @@ -101,7 +101,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await interaction.followUp(
`${interaction.user.toString()}, There was an error processing this image!`
`${interaction.user.toString()}, There was an error processing this image!`
);
}
},
Expand Down
11 changes: 7 additions & 4 deletions commands/Fun/insult.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ module.exports = {
if (!args[0])
return await message.channel.send({
embeds: [
embedMessage("#9dcc37", `Please mention your fav user to insult :)`),
embedMessage(
"#9dcc37",
`❌ Please mention your fav user to insult :)`
),
],
});

Expand All @@ -23,7 +26,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`You sure you mentioned the user ?, because I could not resolve the given user`
`You sure you mentioned the user ?, because I could not resolve the given user`
),
],
});
Expand All @@ -39,7 +42,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send(
`Couldn't retrieve Insult, I blame <@503264757785165851>`
`Couldn't retrieve Insult, I blame <@503264757785165851>`
);
}
},
Expand All @@ -64,7 +67,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await interaction.followUp(
`Couldn't retrieve Insult, I blame <@503264757785165851>`
`Couldn't retrieve Insult, I blame <@503264757785165851>`
);
}
},
Expand Down
4 changes: 2 additions & 2 deletions commands/Fun/jokes.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
} catch (err) {
client.logger(err.message, "error");
await message.channel.send(
`Could not retrieve a Joke, I blame <@503264757785165851>`
`Could not retrieve a Joke, I blame <@503264757785165851>`
);
}
},
Expand Down Expand Up @@ -87,7 +87,7 @@ module.exports = {
} catch (err) {
client.logger(err.message, "error");
await interaction.followUp(
`Could not retrieve a Joke, I blame <@503264757785165851>`
`Could not retrieve a Joke, I blame <@503264757785165851>`
);
}
},
Expand Down
4 changes: 2 additions & 2 deletions commands/Misc/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
const user = getUserFromMention(args[0], client) || message.member.user;

if (!user.avatarURL())
return await message.channel.send("This user has no avatar!");
return await message.channel.send("This user has no avatar!");

const embed = {
color: "#9dcc37",
Expand Down Expand Up @@ -44,7 +44,7 @@ module.exports = {
const user = interaction.options.getUser("user");

if (!user.avatarURL())
return await interaction.followUp(`This user has no avatar!`);
return await interaction.followUp(`This user has no avatar!`);

const embed = {
color: "#9dcc37",
Expand Down
18 changes: 13 additions & 5 deletions commands/Misc/nickname.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ module.exports = {

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

if (
Expand All @@ -41,7 +43,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Could not change your nickname, maybe you are the owner?\n Error: ${error.message}`
`Could not change your nickname, maybe you are the owner?\n Error: ${error.message}`
),
],
});
Expand All @@ -58,7 +60,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Could not find User, either he does not exist or you did not mention him`
`Could not find User, either he does not exist or you did not mention him`
),
],
});
Expand Down Expand Up @@ -146,7 +148,10 @@ module.exports = {
await user.setNickname(newNickname);
await interaction.followUp({
embeds: [
embedMessage("#9dcc37", `Nickname has been successfully changed!`),
embedMessage(
"#9dcc37",
`✅ Nickname has been successfully changed!`
),
],
});
} catch (err) {
Expand All @@ -168,7 +173,10 @@ module.exports = {
await interaction.member.setNickname(newNickname);
await interaction.followUp({
embeds: [
embedMessage("#9dcc37", `Nickname has been successfully changed!`),
embedMessage(
"#9dcc37",
`✅ Nickname has been successfully changed!`
),
],
});
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion commands/Misc/perms.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`I was not able to resolve this user, please mention the user!`
`I was not able to resolve this user, please mention the user!`
),
],
});
Expand Down
2 changes: 1 addition & 1 deletion commands/Music/247.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Please specify whether you want to on/off the 24/7 Mode, see ${prefix}h 247 for more info about this command`
`❌ | Please specify whether you want to on/off the 24/7 Mode, see ${prefix}h 247 for more info about this command`
),
],
});
Expand Down
20 changes: 12 additions & 8 deletions commands/Music/8D.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Your Queue is empty, Make sure to play a song first`
`❌ | Your Queue is empty, Make sure to play a song first`
),
],
});
Expand All @@ -25,7 +25,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Please provide whether you want to on/off the filter, see ${prefix}h 8d for more info about this command`
`❌ | Please provide whether you want to on/off the filter, see ${prefix}h 8d for more info about this command`
),
],
});
Expand All @@ -42,20 +42,22 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await message.channel.send({
embeds: [embedMessage("#9dcc37", `Could not set the Filter`)],
embeds: [embedMessage("#9dcc37", `❌ | Could not set the Filter`)],
});
}
break;
case "off":
try {
await queue.setFilters({normalizer: true});
await queue.setFilters({ normalizer: true });
await message.channel.send({
embeds: [embedMessage("#9dcc37", `✅ 8D Filter has been disabled`)],
});
} catch (error) {
client.logger(error.message, "error");
await message.channel.send({
embeds: [embedMessage("#9dcc37", `Could not disable the filter`)],
embeds: [
embedMessage("#9dcc37", `❌ | Could not disable the filter`),
],
});
}
break;
Expand Down Expand Up @@ -83,7 +85,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Your Queue is empty, Make sure to play a song first`
`❌ | Your Queue is empty, Make sure to play a song first`
),
],
});
Expand All @@ -100,7 +102,7 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await interaction.followUp({
embeds: [embedMessage("#9dcc37", `Could not set the Filter`)],
embeds: [embedMessage("#9dcc37", `❌ | Could not set the Filter`)],
});
}
break;
Expand All @@ -113,7 +115,9 @@ module.exports = {
} catch (error) {
client.logger(error.message, "error");
await interaction.followUp({
embeds: [embedMessage("#9dcc37", `Could not disable the filter`)],
embeds: [
embedMessage("#9dcc37", `❌ | Could not disable the filter`),
],
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions commands/Music/back.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Playing Previous Track **${queue.nowPlaying()}**, [${message.member.toString()}]`
`Playing Previous Track **${queue.nowPlaying()}**, [${message.member.toString()}]`
),
],
});
Expand Down Expand Up @@ -73,7 +73,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Playing Previous Track **${queue.nowPlaying()}**, [${interaction.member.toString()}]`
`Playing Previous Track **${queue.nowPlaying()}**, [${interaction.member.toString()}]`
),
],
});
Expand Down
4 changes: 2 additions & 2 deletions commands/Music/bassboost.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Your Queue is empty, Make sure to play a song first`
`Your Queue is empty, Make sure to play a song first`
),
],
});
Expand Down Expand Up @@ -98,7 +98,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
`Your Queue is empty, Make sure to play a song first`
`Your Queue is empty, Make sure to play a song first`
),
],
});
Expand Down
4 changes: 2 additions & 2 deletions commands/Music/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
"Could not clear the queue, maybe there is no queue"
"Could not clear the queue, maybe there is no queue"
),
],
});
Expand Down Expand Up @@ -112,7 +112,7 @@ module.exports = {
embeds: [
embedMessage(
"#9dcc37",
"Could not clear the queue, maybe there is no queue"
"Could not clear the queue, maybe there is no queue"
),
],
});
Expand Down
Loading

0 comments on commit 354b285

Please sign in to comment.