summaryrefslogtreecommitdiff
path: root/commands/git.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/git.js')
-rw-r--r--commands/git.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/commands/git.js b/commands/git.js
index ed98ebf..e4912e1 100644
--- a/commands/git.js
+++ b/commands/git.js
@@ -1,7 +1,7 @@
/** **************************************
*
* Git: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions
+ * Copyright (C) 2017-2021 Alee Productions
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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/alee14-projects/AleeBot')
+ );
+ message.channel.send({embeds: [gitInfo], components: [sourceCode]});
});
};