module.exports = class Reporting { help(room, mobile, input) { var topic = input.join(" ").trim(); switch(topic) { case "buglist": libs.Output.toMobile(mobile.id, "Development is ongoing, so as people play they may come across bugs that have already been reported. Use this command to see if there are any reports for a bug you have encountered."); libs.Output.toMobile(mobile.id, "* buglist - requests a list of bugs from the Trello board"); return true; case "wishlist": case "featurelist": libs.Output.toMobile(mobile.id, "Development is ongoing, so as people play they may be inspired to request new features. Use this command to see if there are any requests for features you want."); libs.Output.toMobile(mobile.id, "* wishlist - requests a list of features from the Trello board"); return true; case "bug": libs.Output.toMobile(mobile.id, "If you have found a bug that isn't already reported (check the {hint}buglist{/hint}, you can add one."); libs.Output.toMobile(mobile.id, "* bug [description] - submits a new bug to the Trello board"); return true; case "feature": libs.Output.toMobile(mobile.id, "If you want to request a feature that isn't already requested (check the {hint}wishlist{/hint}, you can add one."); libs.Output.toMobile(mobile.id, "* feature [description] - submits a new feature to the Trello board"); return true; } } bug(room, mobile, input) { var bugmessage = input.join(" "); libs.Trello.reportBug(bugmessage, function(status, result) { if(status != "error") { libs.Output.toMobile(mobile.id, "You add '" + bugmessage + "' to the buglist", mobile); } else { libs.Output.toMobile(mobile.id, "Adding to the buglist failed: " + result.error, mobile); } }) libs.Output.toMobile(mobile.id, "Sending bug report", mobile); return true; } buglist(room, mobile, input){ libs.Trello.requestBugList(function(status, bugs){ for(var i in bugs) { var bug = bugs[i]; libs.Output.toMobile(mobile.id, bug.pos + ":" + bug.name, mobile); } }); libs.Output.toMobile(mobile.id, "Retrieving buglist from ("+config.trelloUrl+")", mobile); return true; } feature(room, mobile, input) { var featuremessage = input.join(" "); libs.Trello.requestFeature(featuremessage, function(status, result) { if(status != "error") { libs.Output.toMobile(mobile.id, "You add '" + bugmessage + "' to the buglist", mobile); } else { libs.Output.toMobile(mobile.id, "Adding to the buglist failed: " + result.error, mobile); } }) libs.Output.toMobile(mobile.id, "Sending bug report", mobile); } featurelist(room, mobile, input) { libs.Trello.requestFeatures(function(status, features){ for(var i in features) { var feature = features[i]; libs.Output.toMobile(mobile.id, feature.pos + ":" + feature.name, mobile); } }); libs.Output.toMobile(mobile.id, "Retrieving features from ("+config.trelloUrl+")", mobile); return true; } wishlist(room, mobile, input) { return this.featurelist(room, mobile, input); } mud_getErrorMessage() { return "It sounds like no one is {error}listening{/error}."; } };