Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------graph.js-----------
- var config = require('./config')
- var plotly = require('plotly')("BorisBot", config.plotlyApiKey);
- var graph = {};
- graph.demo = function() {
- var data = [{x:[0,1,2], y:[3,2,1], type: 'bar'}];
- var layout = {fileopt : "extend", filename : "nodenodenode"};
- plotly.plot(data, layout, function (err, msg) {
- if (err) return "Not Found";
- return msg;
- });
- };
- module.exports = graph;
- //--------server.js-----------
- //...
- //...
- // Run test sequence
- request(cfg.tgApiUrl + '/getMe', function (error, res, body) {
- console.log('I Am', body);
- });
- commander.sendMessage(cfg.allowedGroups.testChatId, 'Reboot! ' + Date() + '\nWebhook set to ' + cfg.webhookUrl);
- commander.sendMessage(cfg.allowedGroups.testChatId,"Graph demo: " + graph.demo());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement