2022-08-14 05:51:45 -04:00
|
|
|
/* eslint-disable max-len */
|
|
|
|
const changelog = require('../changelog.json');
|
|
|
|
const {MessageEmbed} = require('discord.js');
|
|
|
|
module.exports = {
|
|
|
|
name: 'changelog',
|
|
|
|
alias: ['changelogs'],
|
|
|
|
description: 'Shows the bot\'s changelog',
|
|
|
|
usage: '',
|
|
|
|
trusted: 0,
|
2022-11-16 06:41:30 -05:00
|
|
|
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
|
|
|
|
bot.tellraw(selector, [{text: 'Changelogs:', color: 'green'}]);
|
2022-08-14 05:51:45 -04:00
|
|
|
changelog.forEach((message, number) => {
|
|
|
|
number += 1;
|
2022-11-16 06:41:30 -05:00
|
|
|
bot.tellraw(selector, [{text: `${number}`, color: 'gray'}, {text: ' - ', color: 'dark_gray'}, {text: message, color: 'gray'}]);
|
2022-08-14 05:51:45 -04:00
|
|
|
});
|
|
|
|
},
|
|
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
|
|
|
changelogs = '';
|
|
|
|
changelog.forEach((message, number) => {
|
|
|
|
number += 1;
|
|
|
|
changelogs += `\`${number}\` - \`${message}\`` + '\n';
|
|
|
|
});
|
|
|
|
const Embed = new MessageEmbed()
|
|
|
|
.setColor('#FFFF00')
|
|
|
|
.setTitle('Changelogs')
|
|
|
|
.setDescription(changelogs);
|
|
|
|
channeldc.send({embeds: [Embed]});
|
|
|
|
},
|
|
|
|
};
|