Skip to content

Commit

Permalink
feat(Initiative): ✨ Add color gradient to the embed result
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefouch committed Sep 24, 2022
1 parent 3798a0a commit faa422f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/commands/roll/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ module.exports = class InitiativeCommand extends SebediusCommand {
.setTitle(t('commands:initiative.drawTitle'))
.setThumbnail(user.avatarURL())
.setDescription(this.#createDrawDescription(alias, selectedCards, drawnCards, t))
.setColor(this.bot.config.Commands.init.colorGradient[Math.min(...selectedCards)])
.addFields({
name: t('commands:initiative.drawEvents'),
value: out.join('\n'),
Expand Down
35 changes: 25 additions & 10 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,22 @@ SebediusConfig.defaultLocale = 'en-US';

/** @enum {Object} */
SebediusConfig.Commands = {};
SebediusConfig.Commands.init = { expires: '10d' };
SebediusConfig.Commands.init = {
expires: '10d',
colorGradient: [
0x000000,
0x63be7b,
0x7bb966,
0x90b253,
0xa5ab44,
0xb8a23b,
0xca9839,
0xda8d3e,
0xe78149,
0xf27458,
0xf8696b,
],
};
SebediusConfig.Commands.scrap = { max: 20 };
SebediusConfig.Commands.stats = { start: '2022-09-03' };
SebediusConfig.Commands.roll = {
Expand Down Expand Up @@ -164,15 +179,15 @@ SebediusConfig.Emojis = {

SebediusConfig.CardsIcons = [
'0️⃣',
':one:',
':two:',
':three:',
':four:',
':five:',
':six:',
':seven:',
':eight:',
':nine:',
'1️⃣',
'2️⃣',
'3️⃣',
'4️⃣',
'5️⃣',
'6️⃣',
'7️⃣',
'8️⃣',
'9️⃣',
'🔟',
];

Expand Down

0 comments on commit faa422f

Please sign in to comment.