forked from Supositware/Haha-Yes
Make embed use rank color
This commit is contained in:
parent
e73e9a3a2a
commit
630248d9ea
15 changed files with 18 additions and 18 deletions
|
@ -62,7 +62,7 @@ class FourchanCommand extends Command {
|
|||
}
|
||||
|
||||
const FourchanEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(title)
|
||||
.setDescription(htmlToText.fromString(description))
|
||||
.setImage(`https://i.4cdn.org/${args.board}/${response.threads[i].posts[0].tim}${response.threads[i].posts[0].ext}`)
|
||||
|
|
|
@ -43,7 +43,7 @@ class RedditCommand extends Command {
|
|||
if (response.data.children[i].data.over_18 == true && !message.channel.nsfw)
|
||||
return message.channel.send('No nsfw');
|
||||
const redditEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(response.data.children[i].data.title)
|
||||
.setDescription(response.data.children[i].data.selftext)
|
||||
.setURL('https://reddit.com' + response.data.children[i].data.permalink)
|
||||
|
|
|
@ -20,7 +20,7 @@ class AdviceCommand extends Command {
|
|||
return response.json();
|
||||
}).then((response) => {
|
||||
const adviceEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(response.slip.slip_id)
|
||||
.setDescription(response.slip.advice);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class guessCommand extends Command {
|
|||
const leaderboard = await guessLeaderboard.findAll({order: ['try']});
|
||||
let top = [];
|
||||
let leaderboardEmbed = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Guess leaderboard');
|
||||
for (let i = 0; i < leaderboard.length; i++) {
|
||||
this.client.users.fetch(leaderboard[i].get('memberID'))
|
||||
|
|
|
@ -31,7 +31,7 @@ class aboutCommand extends Command {
|
|||
|
||||
|
||||
const aboutEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setAuthor(this.client.user.username, this.client.user.avatarURL())
|
||||
.setTitle('About me')
|
||||
.setURL('https://gitlab.com/LoicBersier/DiscordBot')
|
||||
|
|
|
@ -16,7 +16,7 @@ class donateCommand extends Command {
|
|||
|
||||
async exec(message) {
|
||||
const Embed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Donation link')
|
||||
.setDescription('If you decide to donate, please use the feedback command to let the owner know about it so he can put you in the about and donator command\n[Paypal](https://www.paypal.me/supositware)\n[Patreon](https://www.patreon.com/bePatron?u=15330358)');
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class HelpCommand extends Command {
|
|||
}, command.description);
|
||||
|
||||
const embed = this.client.util.embed()
|
||||
.setColor(0xFFAC33)
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(`\`${prefix[0]}${command.aliases[0]} ${description.usage}\``)
|
||||
.addField('Description', description.content)
|
||||
.setFooter(`All the available prefix: ${prefix.join(' | ')}`);
|
||||
|
@ -59,7 +59,7 @@ class HelpCommand extends Command {
|
|||
|
||||
async execCommandList(message) {
|
||||
const embed = this.client.util.embed()
|
||||
.setColor(0xFFAC33)
|
||||
.setColor(message.member.displayHexColor)
|
||||
.addField('Command List',
|
||||
[
|
||||
'This is a list of commands.',
|
||||
|
|
|
@ -68,7 +68,7 @@ class musicCommand extends Command {
|
|||
let seconds = time - minutes * 60;
|
||||
|
||||
const musicEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Music found!')
|
||||
.addField('Title', response.results[0].recordings[0].title, true)
|
||||
.addField('Artist', response.results[0].recordings[0].artists[0].name, true)
|
||||
|
|
|
@ -31,7 +31,7 @@ class seebannedwordCommand extends Command {
|
|||
if (list == undefined) return message.channel.send('No word are banned yet.');
|
||||
|
||||
const Embed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('List of banned words')
|
||||
.setDescription(list);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class seetagCommand extends Command {
|
|||
this.client.users.fetch(tagList.dataValues.ownerID)
|
||||
.then(user => {
|
||||
const TagEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(message.guild.name)
|
||||
.addField('Trigger:', tagList['dataValues']['trigger'])
|
||||
.addField('Response:', tagList['dataValues']['response'])
|
||||
|
@ -47,7 +47,7 @@ class seetagCommand extends Command {
|
|||
})
|
||||
.catch(() => {
|
||||
const TagEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(message.guild.name)
|
||||
.addField('Trigger:', tagList['dataValues']['trigger'])
|
||||
.addField('Response:', tagList['dataValues']['response'])
|
||||
|
@ -69,7 +69,7 @@ class seetagCommand extends Command {
|
|||
let tagList = await Tag.findAll({attributes: ['trigger'], where: {serverID: message.guild.id}});
|
||||
const tagString = tagList.map(t => t.trigger).join(', ') || 'No tags set.';
|
||||
const TagEmbed = new MessageEmbed()
|
||||
.setColor('#ff9900')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('List of tags')
|
||||
.setDescription(tagString)
|
||||
.setFooter('Use this command with the name of the tag to see more info about it!');
|
||||
|
|
|
@ -17,7 +17,7 @@ class ServerCommand extends Command {
|
|||
|
||||
async exec(message) {
|
||||
const addEmbed = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(message.guild.name)
|
||||
.setThumbnail(message.guild.iconURL())
|
||||
.addField('Number of users', message.guild.members.filter(member => !member.user.bot).size, true)
|
||||
|
|
|
@ -51,7 +51,7 @@ class StatsCommand extends Command {
|
|||
}
|
||||
|
||||
const statsEmbed = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Bot stats')
|
||||
.setAuthor('Haha yes')
|
||||
.addField('Servers', this.client.guilds.size, true)
|
||||
|
|
|
@ -48,7 +48,7 @@ class TranslationCommand extends Command {
|
|||
|
||||
|
||||
const translationEmbed = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Asked for the following translation:')
|
||||
.setAuthor(message.author.username)
|
||||
.setDescription(response.text[0])
|
||||
|
|
|
@ -17,7 +17,7 @@ class UpdootCommand extends Command {
|
|||
|
||||
async exec(message) {
|
||||
const upDoot = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle('Vote for my bot')
|
||||
.setAuthor(message.author.username)
|
||||
.setDescription('You can vote for my bot if you think the bot is awesome!')
|
||||
|
|
|
@ -34,7 +34,7 @@ class messageListener extends Listener {
|
|||
censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length));
|
||||
}
|
||||
let Embed = new MessageEmbed()
|
||||
.setColor('#FF0000')
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||
.setDescription(censoredMessage);
|
||||
|
||||
|
|
Loading…
Reference in a new issue