diff --git a/changelog.json b/changelog.json index 735e474..7b7584b 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,8 @@ [ - "Discord *list fixed (finally)", + "Discord !list fixed (finally)", "Added *draw", "More commands support added to Discord", - "Music queue added" + "Music queue added", + "Added *netmsg", + "Fixed hashing" ] \ No newline at end of file diff --git a/commands/changelog.js b/commands/changelog.js index b1b1f0f..1b17662 100644 --- a/commands/changelog.js +++ b/commands/changelog.js @@ -8,21 +8,34 @@ module.exports = { usage: '', trusted: 0, execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) { - bot.tellraw(selector, [{text: 'Changelogs:', color: 'green'}]); + const component = []; + + component.push({text: 'Changelogs ', color: 'green'}); + component.push({text: '(', color: 'dark_gray'}); + component.push({text: changelog.length, color: 'gray'}); + component.push({text: ')', color: 'dark_gray'}); + component.push({text: ':', color: 'gray'}); + component.push('\n'); changelog.forEach((message, number) => { number += 1; - bot.tellraw(selector, [{text: `${number}`, color: 'gray'}, {text: ' - ', color: 'dark_gray'}, {text: message, color: 'gray'}]); + component.push({text: number, color: 'gray'}); + component.push({text: ' - ', color: 'dark_gray'}); + component.push({text: message, color: 'gray'}); + component.push('\n'); }); + component.pop(); + + bot.tellraw(selector, component); }, discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc) { - changelogs = ''; + let changelogs = ''; changelog.forEach((message, number) => { number += 1; changelogs += `\`${number}\` - \`${message}\`` + '\n'; }); const Embed = new MessageEmbed() .setColor('#FFFF00') - .setTitle('Changelogs') + .setTitle(`Changelogs (${changelog.length})`) .setDescription(changelogs); channeldc.send({embeds: [Embed]}); },