aboutsummaryrefslogtreecommitdiff
path: root/commands/git.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-07-31 16:38:15 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-07-31 16:38:15 -0400
commit60cd96e366487b9a422ecc685b46a2b300c32be1 (patch)
tree6e71adf12473ca438f10d7716a27a3f0ffc44c3d /commands/git.js
parent3aa27777a7bd1a9bff798412382db8aad3cbd19a (diff)
downloadAleeBot-60cd96e366487b9a422ecc685b46a2b300c32be1.tar.gz
AleeBot-60cd96e366487b9a422ecc685b46a2b300c32be1.tar.bz2
AleeBot-60cd96e366487b9a422ecc685b46a2b300c32be1.zip
Cleanup; Upgraded to Discord.JS v13; More buttons
Diffstat (limited to 'commands/git.js')
-rw-r--r--commands/git.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/commands/git.js b/commands/git.js
index 4f44edb..8f6af1f 100644
--- a/commands/git.js
+++ b/commands/git.js
@@ -18,16 +18,23 @@
*
* *************************************/
module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
+ const { MessageEmbed, MessageButton, MessageActionRow } = require('discord.js');
const git = require('git-last-commit');
git.getLastCommit(function(err, commit) {
- const embed = new Discord.MessageEmbed()
- .setTitle('GitHub Information')
- .addField('**Repository:**', 'https://github.com/aleeproductions/AleeBot')
+ const gitInfo = new MessageEmbed()
+ .setTitle('Git Information')
.addField('**Last Commit:**', commit.subject)
.addField('**Commited By:**', commit.author.name)
.setColor('#1fd619');
- message.channel.send({embed});
+
+ let sourceCode = new MessageActionRow()
+ .addComponents(
+ new MessageButton()
+ .setStyle('LINK')
+ .setLabel('Source Code')
+ .setURL('https://github.com/aleeproductions/AleeBot')
+ );
+ message.channel.send({embeds: [gitInfo], components: [sourceCode]});
});
};