Skip to content

Commit

Permalink
Add machine information command
Browse files Browse the repository at this point in the history
Added the "/ratz machineinfo" command for users to see which system the bot is currently running off of
  • Loading branch information
Gisgar3 committed Oct 1, 2018
1 parent 954b382 commit 95ec639
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var commands = require("./commands.json");
//var tokens = require("./exclude/tokens.json");
var tokens = require("C:/Users/Gavin/Desktop/tokens.json");
var fs = require("fs");
var os = require("os");
var readline = require("readline");
var packagefile = require("./package.json");
var _a = require('electron'), app = _a.app, BrowserWindow = _a.BrowserWindow;
Expand Down Expand Up @@ -243,6 +244,16 @@ bot.on('message', function (message) {
}
});
}
if (message.content.toString() == "/ratz machineinfo") {
var embed = new Discord.RichEmbed()
.setTitle("ratzBot Machine Information")
.setDescription("Information of the current machine running **ratzBot**.")
.setColor(0xcb00ff)
.addField("Machine Architecture", os.arch().toString())
.addField("Machine CPU", os.cpus().model.toString())
.addField("OS Type", os.type().toString())
.addField("Uptime", os.uptime().toString());
}
if (message.content.startsWith("/ratz gituserinfo ")) {
var result = message.content.slice(18);
var getGitUserInfo = {
Expand Down
11 changes: 11 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var commands = require("./commands.json");
//var tokens = require("./exclude/tokens.json");
var tokens = require("C:/Users/Gavin/Desktop/tokens.json");
var fs = require("fs");
var os = require("os");
var readline = require("readline");
var packagefile = require("./package.json");
var _a = require('electron'), app = _a.app, BrowserWindow = _a.BrowserWindow;
Expand Down Expand Up @@ -209,6 +210,16 @@ bot.on('message', function (message) {
}
});
}
if (message.content.toString() == "/ratz machineinfo") {
var embed = new Discord.RichEmbed()
.setTitle("ratzBot Machine Information")
.setDescription("Information of the current machine running **ratzBot**.")
.setColor(0xcb00ff)
.addField("Machine Architecture", os.arch().toString())
.addField("Machine CPU", os.cpus().model.toString())
.addField("OS Type", os.type().toString())
.addField("Uptime", os.uptime().toString())
}
if (message.content.startsWith("/ratz gituserinfo ")) {
var result = message.content.slice(18);
var getGitUserInfo = {
Expand Down

0 comments on commit 95ec639

Please sign in to comment.