{"action":"created","comment":{"url":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments/63283487","id":63283487,"diff_hunk":"@@ -161,6 +152,17 @@ function update_channels(bot){\n     });\n \n }\n+function refreshCurrentRoundSchedules() {\n+    var _45_45 = league.getLeague(\"45+45\", config);\n+    _45_45.getCurrentRoundSchedule(function(err, pairings) {","path":"chesster.js","position":33,"original_position":33,"commit_id":"d7e2f689a6935105d6b40bcb00b83c4ca0143874","original_commit_id":"d7e2f689a6935105d6b40bcb00b83c4ca0143874","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"body":"I like where this is going, but since the leagues will likely update more than round schedules, I think we should simply have a `refresh` function\r\n\r\n```\r\nvar _45_45 = leage.getLeague(\"45+45\", config);\r\n_45_45.refresh();\r\n```\r\n\r\nwhere `refresh` calls `getCurrentRoundSchedule`, `getMods`, `getRosters`, etc","created_at":"2016-05-14T23:15:40Z","updated_at":"2016-05-14T23:15:40Z","html_url":"https://github.com/endrawes0/Chesster/pull/40#discussion_r63283487","pull_request_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments/63283487"},"html":{"href":"https://github.com/endrawes0/Chesster/pull/40#discussion_r63283487"},"pull_request":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/endrawes0/Chesster/pulls/40","id":70105937,"html_url":"https://github.com/endrawes0/Chesster/pull/40","diff_url":"https://github.com/endrawes0/Chesster/pull/40.diff","patch_url":"https://github.com/endrawes0/Chesster/pull/40.patch","issue_url":"https://api.github.com/repos/endrawes0/Chesster/issues/40","number":40,"state":"open","locked":false,"title":"Tinkering with refactoring and tests","user":{"login":"lakinwecker","id":248376,"avatar_url":"https://avatars.githubusercontent.com/u/248376?v=3","gravatar_id":"","url":"https://api.github.com/users/lakinwecker","html_url":"https://github.com/lakinwecker","followers_url":"https://api.github.com/users/lakinwecker/followers","following_url":"https://api.github.com/users/lakinwecker/following{/other_user}","gists_url":"https://api.github.com/users/lakinwecker/gists{/gist_id}","starred_url":"https://api.github.com/users/lakinwecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakinwecker/subscriptions","organizations_url":"https://api.github.com/users/lakinwecker/orgs","repos_url":"https://api.github.com/users/lakinwecker/repos","events_url":"https://api.github.com/users/lakinwecker/events{/privacy}","received_events_url":"https://api.github.com/users/lakinwecker/received_events","type":"User","site_admin":false},"body":"NOTE: this is not a pull request that's ready to be merged. I am making it so that we can easily see and discuss the way in which I am making these changes to see if people like the ideas.  \r\n\r\nThe idea is that we would make a league object which would abstract away dealing with the differences between the spreadsheets, so that commands could operate on both leagues or one league and not have to worry about which one they are using.\r\n\r\nI would like to also add a way to register a controller.hears type message which will automatically pass in the league instance based on which channel you are using.  \r\n\r\nThis also starts down the path of caching information from the spreadsheets to make the actual commands faster and simpler.","created_at":"2016-05-14T22:38:30Z","updated_at":"2016-05-14T23:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80ef9fbee34bf9eb41b3253d507855ced837bac2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/40/commits","review_comments_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/40/comments","review_comment_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endrawes0/Chesster/issues/40/comments","statuses_url":"https://api.github.com/repos/endrawes0/Chesster/statuses/d7e2f689a6935105d6b40bcb00b83c4ca0143874","head":{"label":"lakinwecker:tinkering-with-refactoring-and-tests","ref":"tinkering-with-refactoring-and-tests","sha":"d7e2f689a6935105d6b40bcb00b83c4ca0143874","user":{"login":"lakinwecker","id":248376,"avatar_url":"https://avatars.githubusercontent.com/u/248376?v=3","gravatar_id":"","url":"https://api.github.com/users/lakinwecker","html_url":"https://github.com/lakinwecker","followers_url":"https://api.github.com/users/lakinwecker/followers","following_url":"https://api.github.com/users/lakinwecker/following{/other_user}","gists_url":"https://api.github.com/users/lakinwecker/gists{/gist_id}","starred_url":"https://api.github.com/users/lakinwecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakinwecker/subscriptions","organizations_url":"https://api.github.com/users/lakinwecker/orgs","repos_url":"https://api.github.com/users/lakinwecker/repos","events_url":"https://api.github.com/users/lakinwecker/events{/privacy}","received_events_url":"https://api.github.com/users/lakinwecker/received_events","type":"User","site_admin":false},"repo":{"id":55383657,"name":"Chesster","full_name":"lakinwecker/Chesster","owner":{"login":"lakinwecker","id":248376,"avatar_url":"https://avatars.githubusercontent.com/u/248376?v=3","gravatar_id":"","url":"https://api.github.com/users/lakinwecker","html_url":"https://github.com/lakinwecker","followers_url":"https://api.github.com/users/lakinwecker/followers","following_url":"https://api.github.com/users/lakinwecker/following{/other_user}","gists_url":"https://api.github.com/users/lakinwecker/gists{/gist_id}","starred_url":"https://api.github.com/users/lakinwecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakinwecker/subscriptions","organizations_url":"https://api.github.com/users/lakinwecker/orgs","repos_url":"https://api.github.com/users/lakinwecker/repos","events_url":"https://api.github.com/users/lakinwecker/events{/privacy}","received_events_url":"https://api.github.com/users/lakinwecker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakinwecker/Chesster","description":"Chesster Moderator Bot for Lichess45+45","fork":true,"url":"https://api.github.com/repos/lakinwecker/Chesster","forks_url":"https://api.github.com/repos/lakinwecker/Chesster/forks","keys_url":"https://api.github.com/repos/lakinwecker/Chesster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakinwecker/Chesster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakinwecker/Chesster/teams","hooks_url":"https://api.github.com/repos/lakinwecker/Chesster/hooks","issue_events_url":"https://api.github.com/repos/lakinwecker/Chesster/issues/events{/number}","events_url":"https://api.github.com/repos/lakinwecker/Chesster/events","assignees_url":"https://api.github.com/repos/lakinwecker/Chesster/assignees{/user}","branches_url":"https://api.github.com/repos/lakinwecker/Chesster/branches{/branch}","tags_url":"https://api.github.com/repos/lakinwecker/Chesster/tags","blobs_url":"https://api.github.com/repos/lakinwecker/Chesster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakinwecker/Chesster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakinwecker/Chesster/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakinwecker/Chesster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakinwecker/Chesster/statuses/{sha}","languages_url":"https://api.github.com/repos/lakinwecker/Chesster/languages","stargazers_url":"https://api.github.com/repos/lakinwecker/Chesster/stargazers","contributors_url":"https://api.github.com/repos/lakinwecker/Chesster/contributors","subscribers_url":"https://api.github.com/repos/lakinwecker/Chesster/subscribers","subscription_url":"https://api.github.com/repos/lakinwecker/Chesster/subscription","commits_url":"https://api.github.com/repos/lakinwecker/Chesster/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakinwecker/Chesster/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakinwecker/Chesster/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakinwecker/Chesster/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakinwecker/Chesster/contents/{+path}","compare_url":"https://api.github.com/repos/lakinwecker/Chesster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakinwecker/Chesster/merges","archive_url":"https://api.github.com/repos/lakinwecker/Chesster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakinwecker/Chesster/downloads","issues_url":"https://api.github.com/repos/lakinwecker/Chesster/issues{/number}","pulls_url":"https://api.github.com/repos/lakinwecker/Chesster/pulls{/number}","milestones_url":"https://api.github.com/repos/lakinwecker/Chesster/milestones{/number}","notifications_url":"https://api.github.com/repos/lakinwecker/Chesster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakinwecker/Chesster/labels{/name}","releases_url":"https://api.github.com/repos/lakinwecker/Chesster/releases{/id}","deployments_url":"https://api.github.com/repos/lakinwecker/Chesster/deployments","created_at":"2016-04-04T03:52:43Z","updated_at":"2016-04-04T03:52:44Z","pushed_at":"2016-05-14T22:36:27Z","git_url":"git://github.com/lakinwecker/Chesster.git","ssh_url":"git@github.com:lakinwecker/Chesster.git","clone_url":"https://github.com/lakinwecker/Chesster.git","svn_url":"https://github.com/lakinwecker/Chesster","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"endrawes0:master","ref":"master","sha":"ef88ebe453072ef11fd77bbf7009f4c85ba65ad4","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"repo":{"id":54806632,"name":"Chesster","full_name":"endrawes0/Chesster","owner":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endrawes0/Chesster","description":"Chesster Moderator Bot for Lichess45+45","fork":false,"url":"https://api.github.com/repos/endrawes0/Chesster","forks_url":"https://api.github.com/repos/endrawes0/Chesster/forks","keys_url":"https://api.github.com/repos/endrawes0/Chesster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endrawes0/Chesster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endrawes0/Chesster/teams","hooks_url":"https://api.github.com/repos/endrawes0/Chesster/hooks","issue_events_url":"https://api.github.com/repos/endrawes0/Chesster/issues/events{/number}","events_url":"https://api.github.com/repos/endrawes0/Chesster/events","assignees_url":"https://api.github.com/repos/endrawes0/Chesster/assignees{/user}","branches_url":"https://api.github.com/repos/endrawes0/Chesster/branches{/branch}","tags_url":"https://api.github.com/repos/endrawes0/Chesster/tags","blobs_url":"https://api.github.com/repos/endrawes0/Chesster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endrawes0/Chesster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endrawes0/Chesster/git/refs{/sha}","trees_url":"https://api.github.com/repos/endrawes0/Chesster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endrawes0/Chesster/statuses/{sha}","languages_url":"https://api.github.com/repos/endrawes0/Chesster/languages","stargazers_url":"https://api.github.com/repos/endrawes0/Chesster/stargazers","contributors_url":"https://api.github.com/repos/endrawes0/Chesster/contributors","subscribers_url":"https://api.github.com/repos/endrawes0/Chesster/subscribers","subscription_url":"https://api.github.com/repos/endrawes0/Chesster/subscription","commits_url":"https://api.github.com/repos/endrawes0/Chesster/commits{/sha}","git_commits_url":"https://api.github.com/repos/endrawes0/Chesster/git/commits{/sha}","comments_url":"https://api.github.com/repos/endrawes0/Chesster/comments{/number}","issue_comment_url":"https://api.github.com/repos/endrawes0/Chesster/issues/comments{/number}","contents_url":"https://api.github.com/repos/endrawes0/Chesster/contents/{+path}","compare_url":"https://api.github.com/repos/endrawes0/Chesster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endrawes0/Chesster/merges","archive_url":"https://api.github.com/repos/endrawes0/Chesster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endrawes0/Chesster/downloads","issues_url":"https://api.github.com/repos/endrawes0/Chesster/issues{/number}","pulls_url":"https://api.github.com/repos/endrawes0/Chesster/pulls{/number}","milestones_url":"https://api.github.com/repos/endrawes0/Chesster/milestones{/number}","notifications_url":"https://api.github.com/repos/endrawes0/Chesster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endrawes0/Chesster/labels{/name}","releases_url":"https://api.github.com/repos/endrawes0/Chesster/releases{/id}","deployments_url":"https://api.github.com/repos/endrawes0/Chesster/deployments","created_at":"2016-03-27T01:06:03Z","updated_at":"2016-05-06T00:03:14Z","pushed_at":"2016-05-14T22:38:30Z","git_url":"git://github.com/endrawes0/Chesster.git","ssh_url":"git@github.com:endrawes0/Chesster.git","clone_url":"https://github.com/endrawes0/Chesster.git","svn_url":"https://github.com/endrawes0/Chesster","homepage":null,"size":120,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/40"},"html":{"href":"https://github.com/endrawes0/Chesster/pull/40"},"issue":{"href":"https://api.github.com/repos/endrawes0/Chesster/issues/40"},"comments":{"href":"https://api.github.com/repos/endrawes0/Chesster/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/endrawes0/Chesster/statuses/d7e2f689a6935105d6b40bcb00b83c4ca0143874"}}}}