dbot/modules-stock/imgur/pages.js
Georg 70a21d2b18
Signed-off-by: Georg <georg@lysergic.dev>
Init

- Initial fixes in modules
- Bundled adapted jsbot
- Elaborative README.md
2021-08-24 21:16:26 +02:00

24 lines
628 B
JavaScript

var _ = require('underscore')._;
var pages = function(dbot) {
return {
'/imgur/random': function(req, res) {
var highScore = 0;
res.render('imgurr', { "highscore" : highScore });
},
'/imgur/stats': function(req, res) {
res.render('imgurstats', {
'name': dbot.config.name,
'totalHttpRequests': this.db.totalHttpRequests,
'totalApiRequests': this.db.totalApiRequests,
'totalImages': this.db.totalImages
});
}
};
};
exports.fetch = function(dbot) {
return pages(dbot);
};