{"action":"opened","issue":{"url":"https://api.github.com/repos/mishk0/slack-bot-api/issues/43","repository_url":"https://api.github.com/repos/mishk0/slack-bot-api","labels_url":"https://api.github.com/repos/mishk0/slack-bot-api/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/mishk0/slack-bot-api/issues/43/comments","events_url":"https://api.github.com/repos/mishk0/slack-bot-api/issues/43/events","html_url":"https://github.com/mishk0/slack-bot-api/issues/43","id":162275160,"number":43,"title":"Issue with extending bot","user":{"login":"DoumanAsh","id":5676053,"avatar_url":"https://avatars.githubusercontent.com/u/5676053?v=3","gravatar_id":"","url":"https://api.github.com/users/DoumanAsh","html_url":"https://github.com/DoumanAsh","followers_url":"https://api.github.com/users/DoumanAsh/followers","following_url":"https://api.github.com/users/DoumanAsh/following{/other_user}","gists_url":"https://api.github.com/users/DoumanAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/DoumanAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoumanAsh/subscriptions","organizations_url":"https://api.github.com/users/DoumanAsh/orgs","repos_url":"https://api.github.com/users/DoumanAsh/repos","events_url":"https://api.github.com/users/DoumanAsh/events{/privacy}","received_events_url":"https://api.github.com/users/DoumanAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-25T10:36:15Z","updated_at":"2016-06-25T10:36:15Z","closed_at":null,"body":"When calling super() from my child i get following error:\r\n```\r\nE:\\Downloads\\Git\\js\\aru-slacky.js\\node_modules\\vow\\lib\\vow.js:104\r\n            throw e;\r\n            ^\r\n\r\nError: [Slack Bot Error] undefined\r\n    at assert (E:\\Downloads\\Git\\js\\aru-slacky.js\\node_modules\\slackbots\\libs\\utils.js:15:15)\r\n    at E:\\Downloads\\Git\\js\\aru-slacky.js\\node_modules\\slackbots\\index.js:42:9\r\n    at Array.<anonymous> (E:\\Downloads\\Git\\js\\aru-slacky.js\\node_modules\\vow\\lib\\vow.js:712:56)\r\n    at Immediate.callFns [as _onImmediate] (E:\\Downloads\\Git\\js\\aru-slacky.js\\node_modules\\vow\\lib\\vow.js:23:35)\r\n    at tryOnImmediate (timers.js:543:15)\r\n    at processImmediate [as _immediateCallback] (timers.js:523:5)\r\n```\r\n\r\nNot sure if Bot can be extended like that but here is my code:\r\n```\r\nclass Aru extends Bot {\r\n    constructor(settings = {}) {\r\n        var name = settings.name || \"Aru\";\r\n        var token;\r\n\r\n        if (settings.token) {\r\n            token = settings.token;\r\n        }\r\n        else if (process.env.ARU_SLACK_TOKEN) {\r\n            token = process.env.ARU_SLACK_TOKEN;\r\n        }\r\n        else {\r\n            throw new Error(\"No slack API token available\");\r\n        }\r\n\r\n        super({\r\n            token: token,\r\n            name: name\r\n        });\r\n\r\n        this.master = settings.master || \"douman\";\r\n    }\r\n\r\n    /**\r\n     * Run bot.\r\n     */\r\n    launch() {\r\n        this.on('start', function() {\r\n            bot.postMessageToUser(this.master, 'Good day, master!');\r\n        });\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"DoumanAsh"}}