Skip to content

Commit

Permalink
Added shardtimeVertical to the config
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiln committed Nov 26, 2018
1 parent a44bbbb commit 4df6959
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion commands/shardtimes.js
Expand Up @@ -181,9 +181,13 @@ class Shardtimes extends Command {
});
});
const sortedTimes = times.sort((a, b) => a.name.toLowerCase() > b.name.toLowerCase() ? 1 : 0).map(t => `${t.flag}${t.name}`);
let joiner = " - ";
if (message.guildSettings.shardtimeVertical) {
joiner = "\n";
}
fields.push({
name: time,
value: sortedTimes.join(" - ")
value: sortedTimes.join(joiner)
});
});
return message.channel.send({
Expand Down
4 changes: 2 additions & 2 deletions config_example.js
Expand Up @@ -33,8 +33,8 @@ const config = {
"useEventPages": false,
"eventCountdown": [2880, 1440, 720, 360, 180, 120, 60, 30, 10, 5],
"language": "en_US",
"swgohLanguage": "ENG_US"

"swgohLanguage": "ENG_US",
"shardtimeVertical": false
},

// If you want to send error/ create/ delete message to a log channel
Expand Down
4 changes: 4 additions & 0 deletions modules/models.js
Expand Up @@ -56,6 +56,10 @@ module.exports = (Sequelize, database) => {
swgohLanguage: { // Live-data language
type: Sequelize.TEXT,
defaultValue: "ENG_US"
},
shardtimeVertical: {// Align registered shardmates vertically or not
type: Sequelize.BOOLEAN,
defaultValue: false
}
});

Expand Down

0 comments on commit 4df6959

Please sign in to comment.