{"action":"created","comment":{"url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/comments/91316432","pull_request_review_id":11822245,"id":91316432,"diff_hunk":"@@ -74,6 +78,94 @@ impl Mentionable for User {\n     }\n }\n \n+#[cfg(feature = \"cache\")]\n+impl FromStr for User {\n+    type Err = ();\n+    fn from_str(s: &str) -> StdResult<Self, ()> {\n+        match utils::parse_username(s) {\n+            Some(x) => {\n+                match UserId(x as u64).find() {\n+                    Some(user) => Ok(user),\n+                    _ => Err(())\n+                }\n+            },\n+            _ => Err(())\n+        }\n+    }\n+}\n+\n+impl FromStr for UserId {\n+    type Err = ();\n+    fn from_str(s: &str) -> StdResult<Self, ()> {\n+        match utils::parse_username(s) {\n+            Some(x) => Ok(UserId(x)),\n+            _ => Err(())\n+        }\n+    }\n+}\n+\n+#[cfg(feature = \"cache\")]\n+impl FromStr for Role {\n+    type Err = ();\n+    fn from_str(s: &str) -> StdResult<Self, ()> {\n+        match utils::parse_role(s) {\n+            Some(x) => {\n+                match RoleId(x).find() {\n+                    Some(user) => Ok(user),\n+                    _ => Err(())\n+                }\n+            },\n+            _ => Err(())\n+        }\n+    }\n+}\n+\n+impl FromStr for RoleId {\n+    type Err = ();\n+    fn from_str(s: &str) -> StdResult<Self, ()> {\n+        match utils::parse_role(s) {\n+            Some(x) => Ok(RoleId(x)),\n+            _ => Err(())\n+        }\n+    }","path":"src/model/misc.rs","position":68,"original_position":68,"commit_id":"0e1d27ff51e68295958ef67c327e7b465ee8b187","original_commit_id":"0e1d27ff51e68295958ef67c327e7b465ee8b187","user":{"login":"zeyla","id":23287880,"avatar_url":"https://avatars.githubusercontent.com/u/23287880?v=3","gravatar_id":"","url":"https://api.github.com/users/zeyla","html_url":"https://github.com/zeyla","followers_url":"https://api.github.com/users/zeyla/followers","following_url":"https://api.github.com/users/zeyla/following{/other_user}","gists_url":"https://api.github.com/users/zeyla/gists{/gist_id}","starred_url":"https://api.github.com/users/zeyla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeyla/subscriptions","organizations_url":"https://api.github.com/users/zeyla/orgs","repos_url":"https://api.github.com/users/zeyla/repos","events_url":"https://api.github.com/users/zeyla/events{/privacy}","received_events_url":"https://api.github.com/users/zeyla/received_events","type":"User","site_admin":false},"body":"same here","created_at":"2016-12-07T15:30:33Z","updated_at":"2016-12-07T15:30:33Z","html_url":"https://github.com/zeyla/serenity.rs/pull/36#discussion_r91316432","pull_request_url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/comments/91316432"},"html":{"href":"https://github.com/zeyla/serenity.rs/pull/36#discussion_r91316432"},"pull_request":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36","id":96936880,"html_url":"https://github.com/zeyla/serenity.rs/pull/36","diff_url":"https://github.com/zeyla/serenity.rs/pull/36.diff","patch_url":"https://github.com/zeyla/serenity.rs/pull/36.patch","issue_url":"https://api.github.com/repos/zeyla/serenity.rs/issues/36","number":36,"state":"open","locked":false,"title":"Allow mentionable structs to be used as command arguments","user":{"login":"fwrs","id":22685239,"avatar_url":"https://avatars.githubusercontent.com/u/22685239?v=3","gravatar_id":"","url":"https://api.github.com/users/fwrs","html_url":"https://github.com/fwrs","followers_url":"https://api.github.com/users/fwrs/followers","following_url":"https://api.github.com/users/fwrs/following{/other_user}","gists_url":"https://api.github.com/users/fwrs/gists{/gist_id}","starred_url":"https://api.github.com/users/fwrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwrs/subscriptions","organizations_url":"https://api.github.com/users/fwrs/orgs","repos_url":"https://api.github.com/users/fwrs/repos","events_url":"https://api.github.com/users/fwrs/events{/privacy}","received_events_url":"https://api.github.com/users/fwrs/received_events","type":"User","site_admin":false},"body":"* Add EmojiIdentifier\r\n* Allow User, UserId, Role, RoleId, EmojiIdentifier, Channel and ChannelId to be used as arguments for commands\r\n* Add utils::parse_username, parse_role, parse_channel and parse_emoji","created_at":"2016-12-07T14:47:27Z","updated_at":"2016-12-07T16:04:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acaca6c9e07fde3b460ba2c5abb2f3cd5d38df45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36/commits","review_comments_url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36/comments","review_comment_url":"https://api.github.com/repos/zeyla/serenity.rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zeyla/serenity.rs/issues/36/comments","statuses_url":"https://api.github.com/repos/zeyla/serenity.rs/statuses/0e1d27ff51e68295958ef67c327e7b465ee8b187","head":{"label":"fwrs:default-struct-arguments","ref":"default-struct-arguments","sha":"0e1d27ff51e68295958ef67c327e7b465ee8b187","user":{"login":"fwrs","id":22685239,"avatar_url":"https://avatars.githubusercontent.com/u/22685239?v=3","gravatar_id":"","url":"https://api.github.com/users/fwrs","html_url":"https://github.com/fwrs","followers_url":"https://api.github.com/users/fwrs/followers","following_url":"https://api.github.com/users/fwrs/following{/other_user}","gists_url":"https://api.github.com/users/fwrs/gists{/gist_id}","starred_url":"https://api.github.com/users/fwrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwrs/subscriptions","organizations_url":"https://api.github.com/users/fwrs/orgs","repos_url":"https://api.github.com/users/fwrs/repos","events_url":"https://api.github.com/users/fwrs/events{/privacy}","received_events_url":"https://api.github.com/users/fwrs/received_events","type":"User","site_admin":false},"repo":{"id":75763118,"name":"serenity.rs","full_name":"fwrs/serenity.rs","owner":{"login":"fwrs","id":22685239,"avatar_url":"https://avatars.githubusercontent.com/u/22685239?v=3","gravatar_id":"","url":"https://api.github.com/users/fwrs","html_url":"https://github.com/fwrs","followers_url":"https://api.github.com/users/fwrs/followers","following_url":"https://api.github.com/users/fwrs/following{/other_user}","gists_url":"https://api.github.com/users/fwrs/gists{/gist_id}","starred_url":"https://api.github.com/users/fwrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwrs/subscriptions","organizations_url":"https://api.github.com/users/fwrs/orgs","repos_url":"https://api.github.com/users/fwrs/repos","events_url":"https://api.github.com/users/fwrs/events{/privacy}","received_events_url":"https://api.github.com/users/fwrs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fwrs/serenity.rs","description":"An ergonomic and high-level Rust library for the Discord API.","fork":true,"url":"https://api.github.com/repos/fwrs/serenity.rs","forks_url":"https://api.github.com/repos/fwrs/serenity.rs/forks","keys_url":"https://api.github.com/repos/fwrs/serenity.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fwrs/serenity.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fwrs/serenity.rs/teams","hooks_url":"https://api.github.com/repos/fwrs/serenity.rs/hooks","issue_events_url":"https://api.github.com/repos/fwrs/serenity.rs/issues/events{/number}","events_url":"https://api.github.com/repos/fwrs/serenity.rs/events","assignees_url":"https://api.github.com/repos/fwrs/serenity.rs/assignees{/user}","branches_url":"https://api.github.com/repos/fwrs/serenity.rs/branches{/branch}","tags_url":"https://api.github.com/repos/fwrs/serenity.rs/tags","blobs_url":"https://api.github.com/repos/fwrs/serenity.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fwrs/serenity.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fwrs/serenity.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/fwrs/serenity.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fwrs/serenity.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/fwrs/serenity.rs/languages","stargazers_url":"https://api.github.com/repos/fwrs/serenity.rs/stargazers","contributors_url":"https://api.github.com/repos/fwrs/serenity.rs/contributors","subscribers_url":"https://api.github.com/repos/fwrs/serenity.rs/subscribers","subscription_url":"https://api.github.com/repos/fwrs/serenity.rs/subscription","commits_url":"https://api.github.com/repos/fwrs/serenity.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/fwrs/serenity.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/fwrs/serenity.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/fwrs/serenity.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/fwrs/serenity.rs/contents/{+path}","compare_url":"https://api.github.com/repos/fwrs/serenity.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fwrs/serenity.rs/merges","archive_url":"https://api.github.com/repos/fwrs/serenity.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fwrs/serenity.rs/downloads","issues_url":"https://api.github.com/repos/fwrs/serenity.rs/issues{/number}","pulls_url":"https://api.github.com/repos/fwrs/serenity.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/fwrs/serenity.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/fwrs/serenity.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fwrs/serenity.rs/labels{/name}","releases_url":"https://api.github.com/repos/fwrs/serenity.rs/releases{/id}","deployments_url":"https://api.github.com/repos/fwrs/serenity.rs/deployments","created_at":"2016-12-06T19:17:08Z","updated_at":"2016-12-06T19:17:10Z","pushed_at":"2016-12-07T14:52:26Z","git_url":"git://github.com/fwrs/serenity.rs.git","ssh_url":"git@github.com:fwrs/serenity.rs.git","clone_url":"https://github.com/fwrs/serenity.rs.git","svn_url":"https://github.com/fwrs/serenity.rs","homepage":"https://serenity.zey.moe","size":652,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"zeyla:master","ref":"master","sha":"13de5c2e50410c3a68435dc774537b490bb7115c","user":{"login":"zeyla","id":23287880,"avatar_url":"https://avatars.githubusercontent.com/u/23287880?v=3","gravatar_id":"","url":"https://api.github.com/users/zeyla","html_url":"https://github.com/zeyla","followers_url":"https://api.github.com/users/zeyla/followers","following_url":"https://api.github.com/users/zeyla/following{/other_user}","gists_url":"https://api.github.com/users/zeyla/gists{/gist_id}","starred_url":"https://api.github.com/users/zeyla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeyla/subscriptions","organizations_url":"https://api.github.com/users/zeyla/orgs","repos_url":"https://api.github.com/users/zeyla/repos","events_url":"https://api.github.com/users/zeyla/events{/privacy}","received_events_url":"https://api.github.com/users/zeyla/received_events","type":"User","site_admin":false},"repo":{"id":73012103,"name":"serenity.rs","full_name":"zeyla/serenity.rs","owner":{"login":"zeyla","id":23287880,"avatar_url":"https://avatars.githubusercontent.com/u/23287880?v=3","gravatar_id":"","url":"https://api.github.com/users/zeyla","html_url":"https://github.com/zeyla","followers_url":"https://api.github.com/users/zeyla/followers","following_url":"https://api.github.com/users/zeyla/following{/other_user}","gists_url":"https://api.github.com/users/zeyla/gists{/gist_id}","starred_url":"https://api.github.com/users/zeyla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeyla/subscriptions","organizations_url":"https://api.github.com/users/zeyla/orgs","repos_url":"https://api.github.com/users/zeyla/repos","events_url":"https://api.github.com/users/zeyla/events{/privacy}","received_events_url":"https://api.github.com/users/zeyla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeyla/serenity.rs","description":"An ergonomic and high-level Rust library for the Discord API.","fork":false,"url":"https://api.github.com/repos/zeyla/serenity.rs","forks_url":"https://api.github.com/repos/zeyla/serenity.rs/forks","keys_url":"https://api.github.com/repos/zeyla/serenity.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeyla/serenity.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeyla/serenity.rs/teams","hooks_url":"https://api.github.com/repos/zeyla/serenity.rs/hooks","issue_events_url":"https://api.github.com/repos/zeyla/serenity.rs/issues/events{/number}","events_url":"https://api.github.com/repos/zeyla/serenity.rs/events","assignees_url":"https://api.github.com/repos/zeyla/serenity.rs/assignees{/user}","branches_url":"https://api.github.com/repos/zeyla/serenity.rs/branches{/branch}","tags_url":"https://api.github.com/repos/zeyla/serenity.rs/tags","blobs_url":"https://api.github.com/repos/zeyla/serenity.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeyla/serenity.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeyla/serenity.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeyla/serenity.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeyla/serenity.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/zeyla/serenity.rs/languages","stargazers_url":"https://api.github.com/repos/zeyla/serenity.rs/stargazers","contributors_url":"https://api.github.com/repos/zeyla/serenity.rs/contributors","subscribers_url":"https://api.github.com/repos/zeyla/serenity.rs/subscribers","subscription_url":"https://api.github.com/repos/zeyla/serenity.rs/subscription","commits_url":"https://api.github.com/repos/zeyla/serenity.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeyla/serenity.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeyla/serenity.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeyla/serenity.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeyla/serenity.rs/contents/{+path}","compare_url":"https://api.github.com/repos/zeyla/serenity.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeyla/serenity.rs/merges","archive_url":"https://api.github.com/repos/zeyla/serenity.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeyla/serenity.rs/downloads","issues_url":"https://api.github.com/repos/zeyla/serenity.rs/issues{/number}","pulls_url":"https://api.github.com/repos/zeyla/serenity.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/zeyla/serenity.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/zeyla/serenity.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeyla/serenity.rs/labels{/name}","releases_url":"https://api.github.com/repos/zeyla/serenity.rs/releases{/id}","deployments_url":"https://api.github.com/repos/zeyla/serenity.rs/deployments","created_at":"2016-11-06T18:59:56Z","updated_at":"2016-12-07T03:10:12Z","pushed_at":"2016-12-07T14:52:27Z","git_url":"git://github.com/zeyla/serenity.rs.git","ssh_url":"git@github.com:zeyla/serenity.rs.git","clone_url":"https://github.com/zeyla/serenity.rs.git","svn_url":"https://github.com/zeyla/serenity.rs","homepage":"https://serenity.zey.moe","size":713,"stargazers_count":27,"watchers_count":27,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36"},"html":{"href":"https://github.com/zeyla/serenity.rs/pull/36"},"issue":{"href":"https://api.github.com/repos/zeyla/serenity.rs/issues/36"},"comments":{"href":"https://api.github.com/repos/zeyla/serenity.rs/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zeyla/serenity.rs/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/zeyla/serenity.rs/statuses/0e1d27ff51e68295958ef67c327e7b465ee8b187"}}}}
{"actor":{"display_login":"zeyla"}}