-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from muricans/mbot-testing
7.5.1
- Loading branch information
Showing
12 changed files
with
408 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
const pkg = require('../../package.json'); | ||
const Discord = require('discord.js'); | ||
const fs = require('fs'); | ||
|
||
module.exports = { | ||
name: 'version', | ||
usage: 'No usage data', | ||
description: 'Gets the current version of the bot', | ||
cooldown: 3, | ||
execute(message) { | ||
const embed = new Discord.RichEmbed() | ||
.setTitle('mbot info') | ||
.setThumbnail('https://hotemoji.com/images/dl/v/robot-face-emoji-by-twitter.png') | ||
.setColor('#e9225f') | ||
.addField('Version', `v${pkg.version}`, true) | ||
.addField('Author', 'muricans', true) | ||
.addField('Repository', '[GitHub](https://github.com/muricans/mbot)', true) | ||
.addField('Documentation', '[Here](https://muricans.github.io/)', true); | ||
message.channel.send(embed); | ||
fs.readFile('./version.txt', 'utf8', (err, data) => { | ||
if (err) return console.log(err); | ||
const embed = new Discord.RichEmbed() | ||
.setTitle('mbot info') | ||
.setThumbnail('https://hotemoji.com/images/dl/v/robot-face-emoji-by-twitter.png') | ||
.setColor('#e9225f') | ||
.addField('Version', `v${pkg.version}`, true) | ||
.addField('Author', 'muricans', true) | ||
.addField('Repository', '[GitHub](https://github.com/muricans/mbot)', true) | ||
.addField('Documentation', '[Here](https://muricans.github.io/)', true) | ||
.setFooter(`Git commit: ${data}`, 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'); | ||
message.channel.send(embed); | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.