Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toggle() {
console.log('Hubot was toggled again!');
var isVisible = this.modalPanel.isVisible();
if (isVisible) {
this.modalPanel.hide();
} else {
this.modalPanel.show();
try {
robot = Hubot.loadBot(undefined, "electron", false, "Hubot", false);
var stream = fs.createWriteStream(__dirname + '/../logs/hubot.log');
robot.logger = new Log('debug', stream);
robot.adapter.wireUpResponses(updateWindowWithHubotMessage);
user = robot.brain.userForId(1, 'atom', 'Shell');
console.log('hubot loaded');
// wire up the buttons
hubotOutputWindow = $('#hubot-output');
scriptsPathLink = $('#scripts-link');
// setup the watcher on the play.coffee
startWatchingUserScript();
reloadAllScripts();
function startHubot() {
// adapterPath, adapterName, enableHttpd, botName, botAlias
// adapterPath - the first parameter it is never used, hence undefined
//debugger
robot = Hubot.loadBot(undefined, "electron", false, "Hubot", false);
robot.adapter.once('connected', loadInitialScripts);
robot.adapter.wireUpResponses(updateWindowWithHubotMessage);
robot.run();
updateWindowWithHubotMessage("I'm ready!");
}
hubot_botkit.defineBot(function(botkit, config) {
var bot = {
botkit: botkit,
config: Object.assign({
name: 'pozi',
client: 'shell'
}, config || {}),
utterances: botkit.utterances,
};
var hubot = Hubot.loadBot(null, bot.config.client, true, bot.config.name, null)
bot.startConversation = function(utterance, cb) {
botkit.startConversation(this, utterance, cb);
};
bot.reply = function(utterance, response, cb) {
utterance.send(response)
if (cb) {
cb()
}
};
bot.findConversation = function(message, cb) {
if (cb) {