-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding gravemind library for system commands, added bits to package j…
…son so I can access releasenotes at runtime, and hooked into bot. Resolves #11
- Loading branch information
jake@chrx
committed
Mar 18, 2018
1 parent
4c4ea6a
commit 5001450
Showing
4 changed files
with
37 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// List all local components here | ||
const components = [ | ||
'./sysinfo' | ||
] | ||
|
||
// Go through each chunk of the library and set each exported | ||
// function as its own export of this module | ||
for (sublib of components) { | ||
let lib = require(sublib) | ||
for (operation in lib) { | ||
exports[operation] = lib[operation] | ||
} | ||
console.log(sublib + " loaded!") | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Simple version, bug link, and release notes output | ||
exports.version = function() { | ||
let response = `I am Tavernbot v**${process.env.npm_package_version}**!\n\n` | ||
response += `**Release notes**\n${process.env.npm_package_releasenotes}\n\n` | ||
response += `**Bug or feature request? Drop it here!**\n${process.env.npm_package_bugs_url}\n` | ||
return response | ||
} | ||
|
||
// Util calls for the github issues link | ||
exports.bug = function() { | ||
return `if you found a bug, please report it here: ${process.env.npm_package_bugs_url}` | ||
} | ||
exports.feedback = exports.request = exports.feature = function() { | ||
return `got a feature idea or some feedback? Awesome! Let me know here: ${process.env.npm_package_bugs_url}` | ||
} |
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