{"action":"opened","number":20,"pull_request":{"url":"https://api.github.com/repos/elmadev/botman/pulls/20","id":87709117,"html_url":"https://github.com/elmadev/botman/pull/20","diff_url":"https://github.com/elmadev/botman/pull/20.diff","patch_url":"https://github.com/elmadev/botman/pull/20.patch","issue_url":"https://api.github.com/repos/elmadev/botman/issues/20","number":20,"state":"open","locked":false,"title":"First idea of refactor of botman bot.js. ","user":{"login":"PabloCorso","id":9751721,"avatar_url":"https://avatars.githubusercontent.com/u/9751721?v=3","gravatar_id":"","url":"https://api.github.com/users/PabloCorso","html_url":"https://github.com/PabloCorso","followers_url":"https://api.github.com/users/PabloCorso/followers","following_url":"https://api.github.com/users/PabloCorso/following{/other_user}","gists_url":"https://api.github.com/users/PabloCorso/gists{/gist_id}","starred_url":"https://api.github.com/users/PabloCorso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PabloCorso/subscriptions","organizations_url":"https://api.github.com/users/PabloCorso/orgs","repos_url":"https://api.github.com/users/PabloCorso/repos","events_url":"https://api.github.com/users/PabloCorso/events{/privacy}","received_events_url":"https://api.github.com/users/PabloCorso/received_events","type":"User","site_admin":false},"body":"Request class that handles the message and RequestLogic that handles the user request.\r\nMaybe there are better ways than using classes. Idealy RequestLogic should check if the message if valid (not bot.js), and all the different hadle functions should be in different folders (logging, imdb, simple response, lastfm, etc). That would allow them to be written in more clear ways, and RequestLogic wouldnt be so long and so propense to change.\r\n\r\nI tryed to not change anything of the code flow. So there are not improvements on how things are done. For that I would need help from the mans that know the code better :> Once the code has concerns properly separated, it should be easy to improve the code and remove duplicated code everywhere + maybe start testing parts of it.\r\n\r\nAt least, i guess this can give you an idea or motivation to make some heavy refactor to botman.js. I didnt test everything, so there might be something broken (coz didnt include a function from botman.js in request-logic.js, or simple mistakes like that, nothing fancy).","created_at":"2016-10-03T12:38:52Z","updated_at":"2016-10-03T12:38:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"hexjelly","id":435283,"avatar_url":"https://avatars.githubusercontent.com/u/435283?v=3","gravatar_id":"","url":"https://api.github.com/users/hexjelly","html_url":"https://github.com/hexjelly","followers_url":"https://api.github.com/users/hexjelly/followers","following_url":"https://api.github.com/users/hexjelly/following{/other_user}","gists_url":"https://api.github.com/users/hexjelly/gists{/gist_id}","starred_url":"https://api.github.com/users/hexjelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexjelly/subscriptions","organizations_url":"https://api.github.com/users/hexjelly/orgs","repos_url":"https://api.github.com/users/hexjelly/repos","events_url":"https://api.github.com/users/hexjelly/events{/privacy}","received_events_url":"https://api.github.com/users/hexjelly/received_events","type":"User","site_admin":false},"assignees":[{"login":"hexjelly","id":435283,"avatar_url":"https://avatars.githubusercontent.com/u/435283?v=3","gravatar_id":"","url":"https://api.github.com/users/hexjelly","html_url":"https://github.com/hexjelly","followers_url":"https://api.github.com/users/hexjelly/followers","following_url":"https://api.github.com/users/hexjelly/following{/other_user}","gists_url":"https://api.github.com/users/hexjelly/gists{/gist_id}","starred_url":"https://api.github.com/users/hexjelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexjelly/subscriptions","organizations_url":"https://api.github.com/users/hexjelly/orgs","repos_url":"https://api.github.com/users/hexjelly/repos","events_url":"https://api.github.com/users/hexjelly/events{/privacy}","received_events_url":"https://api.github.com/users/hexjelly/received_events","type":"User","site_admin":false},{"login":"demiters","id":7239988,"avatar_url":"https://avatars.githubusercontent.com/u/7239988?v=3","gravatar_id":"","url":"https://api.github.com/users/demiters","html_url":"https://github.com/demiters","followers_url":"https://api.github.com/users/demiters/followers","following_url":"https://api.github.com/users/demiters/following{/other_user}","gists_url":"https://api.github.com/users/demiters/gists{/gist_id}","starred_url":"https://api.github.com/users/demiters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demiters/subscriptions","organizations_url":"https://api.github.com/users/demiters/orgs","repos_url":"https://api.github.com/users/demiters/repos","events_url":"https://api.github.com/users/demiters/events{/privacy}","received_events_url":"https://api.github.com/users/demiters/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elmadev/botman/pulls/20/commits","review_comments_url":"https://api.github.com/repos/elmadev/botman/pulls/20/comments","review_comment_url":"https://api.github.com/repos/elmadev/botman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elmadev/botman/issues/20/comments","statuses_url":"https://api.github.com/repos/elmadev/botman/statuses/037049af662c573935b39fe45488465dac33792d","head":{"label":"elmadev:msgHandlerRefactor","ref":"msgHandlerRefactor","sha":"037049af662c573935b39fe45488465dac33792d","user":{"login":"elmadev","id":22205490,"avatar_url":"https://avatars.githubusercontent.com/u/22205490?v=3","gravatar_id":"","url":"https://api.github.com/users/elmadev","html_url":"https://github.com/elmadev","followers_url":"https://api.github.com/users/elmadev/followers","following_url":"https://api.github.com/users/elmadev/following{/other_user}","gists_url":"https://api.github.com/users/elmadev/gists{/gist_id}","starred_url":"https://api.github.com/users/elmadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmadev/subscriptions","organizations_url":"https://api.github.com/users/elmadev/orgs","repos_url":"https://api.github.com/users/elmadev/repos","events_url":"https://api.github.com/users/elmadev/events{/privacy}","received_events_url":"https://api.github.com/users/elmadev/received_events","type":"Organization","site_admin":false},"repo":{"id":66999811,"name":"botman","full_name":"elmadev/botman","owner":{"login":"elmadev","id":22205490,"avatar_url":"https://avatars.githubusercontent.com/u/22205490?v=3","gravatar_id":"","url":"https://api.github.com/users/elmadev","html_url":"https://github.com/elmadev","followers_url":"https://api.github.com/users/elmadev/followers","following_url":"https://api.github.com/users/elmadev/following{/other_user}","gists_url":"https://api.github.com/users/elmadev/gists{/gist_id}","starred_url":"https://api.github.com/users/elmadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmadev/subscriptions","organizations_url":"https://api.github.com/users/elmadev/orgs","repos_url":"https://api.github.com/users/elmadev/repos","events_url":"https://api.github.com/users/elmadev/events{/privacy}","received_events_url":"https://api.github.com/users/elmadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elmadev/botman","description":"A Discord bot","fork":false,"url":"https://api.github.com/repos/elmadev/botman","forks_url":"https://api.github.com/repos/elmadev/botman/forks","keys_url":"https://api.github.com/repos/elmadev/botman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elmadev/botman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elmadev/botman/teams","hooks_url":"https://api.github.com/repos/elmadev/botman/hooks","issue_events_url":"https://api.github.com/repos/elmadev/botman/issues/events{/number}","events_url":"https://api.github.com/repos/elmadev/botman/events","assignees_url":"https://api.github.com/repos/elmadev/botman/assignees{/user}","branches_url":"https://api.github.com/repos/elmadev/botman/branches{/branch}","tags_url":"https://api.github.com/repos/elmadev/botman/tags","blobs_url":"https://api.github.com/repos/elmadev/botman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elmadev/botman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elmadev/botman/git/refs{/sha}","trees_url":"https://api.github.com/repos/elmadev/botman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elmadev/botman/statuses/{sha}","languages_url":"https://api.github.com/repos/elmadev/botman/languages","stargazers_url":"https://api.github.com/repos/elmadev/botman/stargazers","contributors_url":"https://api.github.com/repos/elmadev/botman/contributors","subscribers_url":"https://api.github.com/repos/elmadev/botman/subscribers","subscription_url":"https://api.github.com/repos/elmadev/botman/subscription","commits_url":"https://api.github.com/repos/elmadev/botman/commits{/sha}","git_commits_url":"https://api.github.com/repos/elmadev/botman/git/commits{/sha}","comments_url":"https://api.github.com/repos/elmadev/botman/comments{/number}","issue_comment_url":"https://api.github.com/repos/elmadev/botman/issues/comments{/number}","contents_url":"https://api.github.com/repos/elmadev/botman/contents/{+path}","compare_url":"https://api.github.com/repos/elmadev/botman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elmadev/botman/merges","archive_url":"https://api.github.com/repos/elmadev/botman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elmadev/botman/downloads","issues_url":"https://api.github.com/repos/elmadev/botman/issues{/number}","pulls_url":"https://api.github.com/repos/elmadev/botman/pulls{/number}","milestones_url":"https://api.github.com/repos/elmadev/botman/milestones{/number}","notifications_url":"https://api.github.com/repos/elmadev/botman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elmadev/botman/labels{/name}","releases_url":"https://api.github.com/repos/elmadev/botman/releases{/id}","deployments_url":"https://api.github.com/repos/elmadev/botman/deployments","created_at":"2016-08-31T03:30:49Z","updated_at":"2016-09-14T22:31:39Z","pushed_at":"2016-10-03T12:38:52Z","git_url":"git://github.com/elmadev/botman.git","ssh_url":"git@github.com:elmadev/botman.git","clone_url":"https://github.com/elmadev/botman.git","svn_url":"https://github.com/elmadev/botman","homepage":null,"size":112,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"elmadev:master","ref":"master","sha":"8632a882af67cc775e42bd09ab1569abe3652cc7","user":{"login":"elmadev","id":22205490,"avatar_url":"https://avatars.githubusercontent.com/u/22205490?v=3","gravatar_id":"","url":"https://api.github.com/users/elmadev","html_url":"https://github.com/elmadev","followers_url":"https://api.github.com/users/elmadev/followers","following_url":"https://api.github.com/users/elmadev/following{/other_user}","gists_url":"https://api.github.com/users/elmadev/gists{/gist_id}","starred_url":"https://api.github.com/users/elmadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmadev/subscriptions","organizations_url":"https://api.github.com/users/elmadev/orgs","repos_url":"https://api.github.com/users/elmadev/repos","events_url":"https://api.github.com/users/elmadev/events{/privacy}","received_events_url":"https://api.github.com/users/elmadev/received_events","type":"Organization","site_admin":false},"repo":{"id":66999811,"name":"botman","full_name":"elmadev/botman","owner":{"login":"elmadev","id":22205490,"avatar_url":"https://avatars.githubusercontent.com/u/22205490?v=3","gravatar_id":"","url":"https://api.github.com/users/elmadev","html_url":"https://github.com/elmadev","followers_url":"https://api.github.com/users/elmadev/followers","following_url":"https://api.github.com/users/elmadev/following{/other_user}","gists_url":"https://api.github.com/users/elmadev/gists{/gist_id}","starred_url":"https://api.github.com/users/elmadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmadev/subscriptions","organizations_url":"https://api.github.com/users/elmadev/orgs","repos_url":"https://api.github.com/users/elmadev/repos","events_url":"https://api.github.com/users/elmadev/events{/privacy}","received_events_url":"https://api.github.com/users/elmadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elmadev/botman","description":"A Discord bot","fork":false,"url":"https://api.github.com/repos/elmadev/botman","forks_url":"https://api.github.com/repos/elmadev/botman/forks","keys_url":"https://api.github.com/repos/elmadev/botman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elmadev/botman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elmadev/botman/teams","hooks_url":"https://api.github.com/repos/elmadev/botman/hooks","issue_events_url":"https://api.github.com/repos/elmadev/botman/issues/events{/number}","events_url":"https://api.github.com/repos/elmadev/botman/events","assignees_url":"https://api.github.com/repos/elmadev/botman/assignees{/user}","branches_url":"https://api.github.com/repos/elmadev/botman/branches{/branch}","tags_url":"https://api.github.com/repos/elmadev/botman/tags","blobs_url":"https://api.github.com/repos/elmadev/botman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elmadev/botman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elmadev/botman/git/refs{/sha}","trees_url":"https://api.github.com/repos/elmadev/botman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elmadev/botman/statuses/{sha}","languages_url":"https://api.github.com/repos/elmadev/botman/languages","stargazers_url":"https://api.github.com/repos/elmadev/botman/stargazers","contributors_url":"https://api.github.com/repos/elmadev/botman/contributors","subscribers_url":"https://api.github.com/repos/elmadev/botman/subscribers","subscription_url":"https://api.github.com/repos/elmadev/botman/subscription","commits_url":"https://api.github.com/repos/elmadev/botman/commits{/sha}","git_commits_url":"https://api.github.com/repos/elmadev/botman/git/commits{/sha}","comments_url":"https://api.github.com/repos/elmadev/botman/comments{/number}","issue_comment_url":"https://api.github.com/repos/elmadev/botman/issues/comments{/number}","contents_url":"https://api.github.com/repos/elmadev/botman/contents/{+path}","compare_url":"https://api.github.com/repos/elmadev/botman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elmadev/botman/merges","archive_url":"https://api.github.com/repos/elmadev/botman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elmadev/botman/downloads","issues_url":"https://api.github.com/repos/elmadev/botman/issues{/number}","pulls_url":"https://api.github.com/repos/elmadev/botman/pulls{/number}","milestones_url":"https://api.github.com/repos/elmadev/botman/milestones{/number}","notifications_url":"https://api.github.com/repos/elmadev/botman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elmadev/botman/labels{/name}","releases_url":"https://api.github.com/repos/elmadev/botman/releases{/id}","deployments_url":"https://api.github.com/repos/elmadev/botman/deployments","created_at":"2016-08-31T03:30:49Z","updated_at":"2016-09-14T22:31:39Z","pushed_at":"2016-10-03T12:38:52Z","git_url":"git://github.com/elmadev/botman.git","ssh_url":"git@github.com:elmadev/botman.git","clone_url":"https://github.com/elmadev/botman.git","svn_url":"https://github.com/elmadev/botman","homepage":null,"size":112,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elmadev/botman/pulls/20"},"html":{"href":"https://github.com/elmadev/botman/pull/20"},"issue":{"href":"https://api.github.com/repos/elmadev/botman/issues/20"},"comments":{"href":"https://api.github.com/repos/elmadev/botman/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/elmadev/botman/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/elmadev/botman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elmadev/botman/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/elmadev/botman/statuses/037049af662c573935b39fe45488465dac33792d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":366,"deletions":252,"changed_files":3}}
{"actor":{"display_login":"PabloCorso"}}