This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Messenger { | |
| constructor() { | |
| this.bot = new TelegramBot('Your token here', { polling: true }); | |
| } | |
| listen() { | |
| this.bot.on('text', this.handleText.bind(this)) | |
| } | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'babel-core/polyfill' | |
| import React from 'react' | |
| import { render } from 'react-dom' | |
| import Root from './containers/Root' | |
| import configureStore from './store/configureStore' | |
| const store = configureStore() | |
| render( | |
| <Root store={store} />, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| 'use strict'; | |
| ThemeController.$inject = ['$scope', 'User', 'Notifications']; | |
| function ThemeController($scope, User, Notifications) { | |
| var vm = this; | |
| vm.user = {}; | |
| vm.saveUser = saveUser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| UserModel.$inject = '$resource'; | |
| function UserModel($resource) { | |
| var baseUrl = 'api/user/:dest'; | |
| var User = {}; | |
| var userMethods = $resource(baseUrl, {}, { | |
| get: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| 'use strict'; | |
| ThemeController.$inject = ['$scope', 'Notifications']; | |
| function ThemeController($scope, Notifications) { | |
| $scope.user = {}; | |
| $scope.changeTheme = function(theme) { | |
| $scope.user.theme = theme; |
NewerOlder