{"action":"created","comment":{"url":"https://api.github.com/repos/strinking/statbot/pulls/comments/181548476","pull_request_review_id":112203735,"id":181548476,"diff_hunk":"@@ -0,0 +1,42 @@\n+#\n+# status.py\n+#\n+# statbot - Store Discord records for later analysis\n+# Copyright (c) 2017-2018 Ammon Smith\n+#\n+# statbot is available free of charge under the terms of the MIT\n+# License. You are free to redistribute and/or modify it under those\n+# terms. It is distributed in the hopes that it will be useful, but\n+# WITHOUT ANY WARRANTY. See the LICENSE file for more details.\n+#\n+\n+from enum import Enum, unique\n+\n+import discord\n+\n+__all__ = [\n+    'UserStatus',\n+]\n+\n+# Type \"discord.Status\" type conflicts with some Postgres thing,\n+# so we duplicate it here under a different name.\n+\n+@unique\n+class UserStatus(Enum):\n+    ONLINE = 'ONLINE'\n+    OFFLINE = 'OFFLINE'\n+    IDLE = 'IDLE'\n+    DO_NOT_DISTURB = 'DO_NOT_DISTURB'\n+\n+    @staticmethod\n+    def convert(status):\n+        return USER_STATUS_CONVERSION[status]\n+\n+USER_STATUS_CONVERSION = {\n+    discord.Status.online: UserStatus.ONLINE,\n+    discord.Status.offline: UserStatus.OFFLINE,\n+    discord.Status.idle: UserStatus.IDLE,\n+    discord.Status.dnd: UserStatus.DO_NOT_DISTURB,\n+    discord.Status.do_not_disturb: UserStatus.DO_NOT_DISTURB,\n+    discord.Status.invisible: UserStatus.OFFLINE,\n+}","path":"statbot/status.py","position":42,"original_position":42,"commit_id":"000518f77ee7d840811407311899e4d55c30dbbd","original_commit_id":"000518f77ee7d840811407311899e4d55c30dbbd","user":{"login":"Volcyy","id":22679924,"avatar_url":"https://avatars3.githubusercontent.com/u/22679924?v=4","gravatar_id":"","url":"https://api.github.com/users/Volcyy","html_url":"https://github.com/Volcyy","followers_url":"https://api.github.com/users/Volcyy/followers","following_url":"https://api.github.com/users/Volcyy/following{/other_user}","gists_url":"https://api.github.com/users/Volcyy/gists{/gist_id}","starred_url":"https://api.github.com/users/Volcyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Volcyy/subscriptions","organizations_url":"https://api.github.com/users/Volcyy/orgs","repos_url":"https://api.github.com/users/Volcyy/repos","events_url":"https://api.github.com/users/Volcyy/events{/privacy}","received_events_url":"https://api.github.com/users/Volcyy/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2018-04-14T10:24:08Z","updated_at":"2018-04-14T10:25:10Z","html_url":"https://github.com/strinking/statbot/pull/51#discussion_r181548476","pull_request_url":"https://api.github.com/repos/strinking/statbot/pulls/51","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/strinking/statbot/pulls/comments/181548476"},"html":{"href":"https://github.com/strinking/statbot/pull/51#discussion_r181548476"},"pull_request":{"href":"https://api.github.com/repos/strinking/statbot/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/strinking/statbot/pulls/51","id":179251799,"html_url":"https://github.com/strinking/statbot/pull/51","diff_url":"https://github.com/strinking/statbot/pull/51.diff","patch_url":"https://github.com/strinking/statbot/pull/51.patch","issue_url":"https://api.github.com/repos/strinking/statbot/issues/51","number":51,"state":"open","locked":false,"title":"Track status changes, voice status changes, and games (activities)","user":{"login":"ammongit","id":8848022,"avatar_url":"https://avatars0.githubusercontent.com/u/8848022?v=4","gravatar_id":"","url":"https://api.github.com/users/ammongit","html_url":"https://github.com/ammongit","followers_url":"https://api.github.com/users/ammongit/followers","following_url":"https://api.github.com/users/ammongit/following{/other_user}","gists_url":"https://api.github.com/users/ammongit/gists{/gist_id}","starred_url":"https://api.github.com/users/ammongit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammongit/subscriptions","organizations_url":"https://api.github.com/users/ammongit/orgs","repos_url":"https://api.github.com/users/ammongit/repos","events_url":"https://api.github.com/users/ammongit/events{/privacy}","received_events_url":"https://api.github.com/users/ammongit/received_events","type":"User","site_admin":false},"body":"Updates the old branch to use the new concept of the \"activity\", and properly handle status changes and activity updates.","created_at":"2018-04-04T00:12:54Z","updated_at":"2018-04-14T10:25:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd716c4f85d3dffb0519d25926e900b13a7ce03d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"robstolarz","id":3682844,"avatar_url":"https://avatars1.githubusercontent.com/u/3682844?v=4","gravatar_id":"","url":"https://api.github.com/users/robstolarz","html_url":"https://github.com/robstolarz","followers_url":"https://api.github.com/users/robstolarz/followers","following_url":"https://api.github.com/users/robstolarz/following{/other_user}","gists_url":"https://api.github.com/users/robstolarz/gists{/gist_id}","starred_url":"https://api.github.com/users/robstolarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robstolarz/subscriptions","organizations_url":"https://api.github.com/users/robstolarz/orgs","repos_url":"https://api.github.com/users/robstolarz/repos","events_url":"https://api.github.com/users/robstolarz/events{/privacy}","received_events_url":"https://api.github.com/users/robstolarz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/strinking/statbot/pulls/51/commits","review_comments_url":"https://api.github.com/repos/strinking/statbot/pulls/51/comments","review_comment_url":"https://api.github.com/repos/strinking/statbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strinking/statbot/issues/51/comments","statuses_url":"https://api.github.com/repos/strinking/statbot/statuses/000518f77ee7d840811407311899e4d55c30dbbd","head":{"label":"strinking:status-changes","ref":"status-changes","sha":"000518f77ee7d840811407311899e4d55c30dbbd","user":{"login":"strinking","id":29065127,"avatar_url":"https://avatars3.githubusercontent.com/u/29065127?v=4","gravatar_id":"","url":"https://api.github.com/users/strinking","html_url":"https://github.com/strinking","followers_url":"https://api.github.com/users/strinking/followers","following_url":"https://api.github.com/users/strinking/following{/other_user}","gists_url":"https://api.github.com/users/strinking/gists{/gist_id}","starred_url":"https://api.github.com/users/strinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strinking/subscriptions","organizations_url":"https://api.github.com/users/strinking/orgs","repos_url":"https://api.github.com/users/strinking/repos","events_url":"https://api.github.com/users/strinking/events{/privacy}","received_events_url":"https://api.github.com/users/strinking/received_events","type":"Organization","site_admin":false},"repo":{"id":95486870,"name":"statbot","full_name":"strinking/statbot","owner":{"login":"strinking","id":29065127,"avatar_url":"https://avatars3.githubusercontent.com/u/29065127?v=4","gravatar_id":"","url":"https://api.github.com/users/strinking","html_url":"https://github.com/strinking","followers_url":"https://api.github.com/users/strinking/followers","following_url":"https://api.github.com/users/strinking/following{/other_user}","gists_url":"https://api.github.com/users/strinking/gists{/gist_id}","starred_url":"https://api.github.com/users/strinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strinking/subscriptions","organizations_url":"https://api.github.com/users/strinking/orgs","repos_url":"https://api.github.com/users/strinking/repos","events_url":"https://api.github.com/users/strinking/events{/privacy}","received_events_url":"https://api.github.com/users/strinking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strinking/statbot","description":"A data ingestion bot that reads records from Discord guilds into a SQL database.","fork":false,"url":"https://api.github.com/repos/strinking/statbot","forks_url":"https://api.github.com/repos/strinking/statbot/forks","keys_url":"https://api.github.com/repos/strinking/statbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strinking/statbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strinking/statbot/teams","hooks_url":"https://api.github.com/repos/strinking/statbot/hooks","issue_events_url":"https://api.github.com/repos/strinking/statbot/issues/events{/number}","events_url":"https://api.github.com/repos/strinking/statbot/events","assignees_url":"https://api.github.com/repos/strinking/statbot/assignees{/user}","branches_url":"https://api.github.com/repos/strinking/statbot/branches{/branch}","tags_url":"https://api.github.com/repos/strinking/statbot/tags","blobs_url":"https://api.github.com/repos/strinking/statbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strinking/statbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strinking/statbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/strinking/statbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strinking/statbot/statuses/{sha}","languages_url":"https://api.github.com/repos/strinking/statbot/languages","stargazers_url":"https://api.github.com/repos/strinking/statbot/stargazers","contributors_url":"https://api.github.com/repos/strinking/statbot/contributors","subscribers_url":"https://api.github.com/repos/strinking/statbot/subscribers","subscription_url":"https://api.github.com/repos/strinking/statbot/subscription","commits_url":"https://api.github.com/repos/strinking/statbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/strinking/statbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/strinking/statbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/strinking/statbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/strinking/statbot/contents/{+path}","compare_url":"https://api.github.com/repos/strinking/statbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strinking/statbot/merges","archive_url":"https://api.github.com/repos/strinking/statbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strinking/statbot/downloads","issues_url":"https://api.github.com/repos/strinking/statbot/issues{/number}","pulls_url":"https://api.github.com/repos/strinking/statbot/pulls{/number}","milestones_url":"https://api.github.com/repos/strinking/statbot/milestones{/number}","notifications_url":"https://api.github.com/repos/strinking/statbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strinking/statbot/labels{/name}","releases_url":"https://api.github.com/repos/strinking/statbot/releases{/id}","deployments_url":"https://api.github.com/repos/strinking/statbot/deployments","created_at":"2017-06-26T20:30:58Z","updated_at":"2018-04-06T09:31:38Z","pushed_at":"2018-04-14T05:30:37Z","git_url":"git://github.com/strinking/statbot.git","ssh_url":"git@github.com:strinking/statbot.git","clone_url":"https://github.com/strinking/statbot.git","svn_url":"https://github.com/strinking/statbot","homepage":"","size":375,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"strinking:master","ref":"master","sha":"2c26802258c2d684e92c976863181cf5e0da5b66","user":{"login":"strinking","id":29065127,"avatar_url":"https://avatars3.githubusercontent.com/u/29065127?v=4","gravatar_id":"","url":"https://api.github.com/users/strinking","html_url":"https://github.com/strinking","followers_url":"https://api.github.com/users/strinking/followers","following_url":"https://api.github.com/users/strinking/following{/other_user}","gists_url":"https://api.github.com/users/strinking/gists{/gist_id}","starred_url":"https://api.github.com/users/strinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strinking/subscriptions","organizations_url":"https://api.github.com/users/strinking/orgs","repos_url":"https://api.github.com/users/strinking/repos","events_url":"https://api.github.com/users/strinking/events{/privacy}","received_events_url":"https://api.github.com/users/strinking/received_events","type":"Organization","site_admin":false},"repo":{"id":95486870,"name":"statbot","full_name":"strinking/statbot","owner":{"login":"strinking","id":29065127,"avatar_url":"https://avatars3.githubusercontent.com/u/29065127?v=4","gravatar_id":"","url":"https://api.github.com/users/strinking","html_url":"https://github.com/strinking","followers_url":"https://api.github.com/users/strinking/followers","following_url":"https://api.github.com/users/strinking/following{/other_user}","gists_url":"https://api.github.com/users/strinking/gists{/gist_id}","starred_url":"https://api.github.com/users/strinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strinking/subscriptions","organizations_url":"https://api.github.com/users/strinking/orgs","repos_url":"https://api.github.com/users/strinking/repos","events_url":"https://api.github.com/users/strinking/events{/privacy}","received_events_url":"https://api.github.com/users/strinking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strinking/statbot","description":"A data ingestion bot that reads records from Discord guilds into a SQL database.","fork":false,"url":"https://api.github.com/repos/strinking/statbot","forks_url":"https://api.github.com/repos/strinking/statbot/forks","keys_url":"https://api.github.com/repos/strinking/statbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strinking/statbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strinking/statbot/teams","hooks_url":"https://api.github.com/repos/strinking/statbot/hooks","issue_events_url":"https://api.github.com/repos/strinking/statbot/issues/events{/number}","events_url":"https://api.github.com/repos/strinking/statbot/events","assignees_url":"https://api.github.com/repos/strinking/statbot/assignees{/user}","branches_url":"https://api.github.com/repos/strinking/statbot/branches{/branch}","tags_url":"https://api.github.com/repos/strinking/statbot/tags","blobs_url":"https://api.github.com/repos/strinking/statbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strinking/statbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strinking/statbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/strinking/statbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strinking/statbot/statuses/{sha}","languages_url":"https://api.github.com/repos/strinking/statbot/languages","stargazers_url":"https://api.github.com/repos/strinking/statbot/stargazers","contributors_url":"https://api.github.com/repos/strinking/statbot/contributors","subscribers_url":"https://api.github.com/repos/strinking/statbot/subscribers","subscription_url":"https://api.github.com/repos/strinking/statbot/subscription","commits_url":"https://api.github.com/repos/strinking/statbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/strinking/statbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/strinking/statbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/strinking/statbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/strinking/statbot/contents/{+path}","compare_url":"https://api.github.com/repos/strinking/statbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strinking/statbot/merges","archive_url":"https://api.github.com/repos/strinking/statbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strinking/statbot/downloads","issues_url":"https://api.github.com/repos/strinking/statbot/issues{/number}","pulls_url":"https://api.github.com/repos/strinking/statbot/pulls{/number}","milestones_url":"https://api.github.com/repos/strinking/statbot/milestones{/number}","notifications_url":"https://api.github.com/repos/strinking/statbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strinking/statbot/labels{/name}","releases_url":"https://api.github.com/repos/strinking/statbot/releases{/id}","deployments_url":"https://api.github.com/repos/strinking/statbot/deployments","created_at":"2017-06-26T20:30:58Z","updated_at":"2018-04-06T09:31:38Z","pushed_at":"2018-04-14T05:30:37Z","git_url":"git://github.com/strinking/statbot.git","ssh_url":"git@github.com:strinking/statbot.git","clone_url":"https://github.com/strinking/statbot.git","svn_url":"https://github.com/strinking/statbot","homepage":"","size":375,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strinking/statbot/pulls/51"},"html":{"href":"https://github.com/strinking/statbot/pull/51"},"issue":{"href":"https://api.github.com/repos/strinking/statbot/issues/51"},"comments":{"href":"https://api.github.com/repos/strinking/statbot/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/strinking/statbot/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/strinking/statbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strinking/statbot/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/strinking/statbot/statuses/000518f77ee7d840811407311899e4d55c30dbbd"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Volcyy"}}