{"action":"created","comment":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/31863364","id":31863364,"diff_hunk":"@@ -424,6 +429,64 @@ enough to get you started. You can watch the data sent and received from\n the server on a regular connection, or look at the client source code\n for a full list of message types.\n \n+**Action requests**\n+\n+These are how the client sends the player's decisions to the server. Most\n+requests are sent with `REQUESTID`. `REQUESTID` is used to identify which\n+action the request was intended for and is used to protect against race\n+conditions with the cancel button. The first decision of a match has a\n+`REQUESTID` of 1, and each successful decision increments the counter by 1.\n+`REQUESTID` is optional.\n+\n+`|/team ORDER|REQUESTID`\n+\n+> Chooses the team order. Numbers not listed are displaced to the back by swapping\n+> them with the number that took their place. For example `/team 25` sets the team\n+> order from default to 253416.\n+\n+`|/move NUMBER TARGET|REQUESTID`\n+\n+> Requests to use the selected move `NUMBER` on `TARGET` Pokemon. `NUMBER` starts at\n+> 1 and can be up to 12 (though usually 4), where `NUMBER` calls the move indexed at\n+> `NUMBER - 1` in the Pokemon's set.\n+>\n+> Moves with `TARGET` specify which position they are trying to use the move on as a\n+> number wherein the opposing Pokemon are positive integers counting up from `1`\n+> starting on the right. Ally Pokemon targets are negative integers counting down from\n+> `-1` starting on the left. `TARGET` is optional and only needs to be specified for\n+> single target moves in doubles/triples formats.\n+\n+`|/switch NUMBER|REQUESTID`\n+\n+> Requests to switch the active Pokemon with the Pokemon at position `NUMBER` on the\n+> team. In cases where a Pokemon is KO'd, their replacement is chosen with `/switch`.","path":"PROTOCOL.md","position":54,"original_position":46,"commit_id":"c60389d368d7919a2691cc536b9a2820a66900f5","original_commit_id":"2816eb994a4fcda5edebdd84c3a13d0bdad56977","user":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"body":"We should probably call it `RQID` to match what it's called in `REQUEST`, then.\r\n\r\nAlso, didn't I tell you to remove `|REQUESTID` from the individual documentation lines?","created_at":"2015-06-06T01:56:00Z","updated_at":"2015-06-06T01:56:00Z","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1915#discussion_r31863364","pull_request_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915","_links":{"self":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/31863364"},"html":{"href":"https://github.com/Zarel/Pokemon-Showdown/pull/1915#discussion_r31863364"},"pull_request":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915"}}},"pull_request":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915","id":36768515,"html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1915","diff_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1915.diff","patch_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1915.patch","issue_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1915","number":1915,"state":"open","locked":false,"title":"Battle request commands documentation","user":{"login":"SolarisFox","id":7889474,"avatar_url":"https://avatars.githubusercontent.com/u/7889474?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarisFox","html_url":"https://github.com/SolarisFox","followers_url":"https://api.github.com/users/SolarisFox/followers","following_url":"https://api.github.com/users/SolarisFox/following{/other_user}","gists_url":"https://api.github.com/users/SolarisFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarisFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarisFox/subscriptions","organizations_url":"https://api.github.com/users/SolarisFox/orgs","repos_url":"https://api.github.com/users/SolarisFox/repos","events_url":"https://api.github.com/users/SolarisFox/events{/privacy}","received_events_url":"https://api.github.com/users/SolarisFox/received_events","type":"User","site_admin":false},"body":"I don't remember if it was @ascriptmaster or @Slayer95 who recommended this, but I took a shot at it. This definitely isn't the most succinct way to explain what's happening, but I figured this would be enough of an outline that I could take corrections from those who understand this better then I do.","created_at":"2015-06-02T20:07:59Z","updated_at":"2015-06-06T01:56:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b31a348ef6ffee685029a99fa63cdcfe615a29c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915/commits","review_comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915/comments","review_comment_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1915/comments","statuses_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/c60389d368d7919a2691cc536b9a2820a66900f5","head":{"label":"SolarisFox:patch-5","ref":"patch-5","sha":"c60389d368d7919a2691cc536b9a2820a66900f5","user":{"login":"SolarisFox","id":7889474,"avatar_url":"https://avatars.githubusercontent.com/u/7889474?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarisFox","html_url":"https://github.com/SolarisFox","followers_url":"https://api.github.com/users/SolarisFox/followers","following_url":"https://api.github.com/users/SolarisFox/following{/other_user}","gists_url":"https://api.github.com/users/SolarisFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarisFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarisFox/subscriptions","organizations_url":"https://api.github.com/users/SolarisFox/orgs","repos_url":"https://api.github.com/users/SolarisFox/repos","events_url":"https://api.github.com/users/SolarisFox/events{/privacy}","received_events_url":"https://api.github.com/users/SolarisFox/received_events","type":"User","site_admin":false},"repo":{"id":20943048,"name":"Pokemon-Showdown","full_name":"SolarisFox/Pokemon-Showdown","owner":{"login":"SolarisFox","id":7889474,"avatar_url":"https://avatars.githubusercontent.com/u/7889474?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarisFox","html_url":"https://github.com/SolarisFox","followers_url":"https://api.github.com/users/SolarisFox/followers","following_url":"https://api.github.com/users/SolarisFox/following{/other_user}","gists_url":"https://api.github.com/users/SolarisFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarisFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarisFox/subscriptions","organizations_url":"https://api.github.com/users/SolarisFox/orgs","repos_url":"https://api.github.com/users/SolarisFox/repos","events_url":"https://api.github.com/users/SolarisFox/events{/privacy}","received_events_url":"https://api.github.com/users/SolarisFox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SolarisFox/Pokemon-Showdown","description":"Pokémon battle simulator.","fork":true,"url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown","forks_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/forks","keys_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/teams","hooks_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/hooks","issue_events_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/issues/events{/number}","events_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/events","assignees_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/assignees{/user}","branches_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/branches{/branch}","tags_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/tags","blobs_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/statuses/{sha}","languages_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/languages","stargazers_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/stargazers","contributors_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/contributors","subscribers_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/subscribers","subscription_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/subscription","commits_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/contents/{+path}","compare_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/merges","archive_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/downloads","issues_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/issues{/number}","pulls_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/pulls{/number}","milestones_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/milestones{/number}","notifications_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/labels{/name}","releases_url":"https://api.github.com/repos/SolarisFox/Pokemon-Showdown/releases{/id}","created_at":"2014-06-17T23:39:45Z","updated_at":"2015-04-25T22:58:43Z","pushed_at":"2015-06-05T23:26:38Z","git_url":"git://github.com/SolarisFox/Pokemon-Showdown.git","ssh_url":"git@github.com:SolarisFox/Pokemon-Showdown.git","clone_url":"https://github.com/SolarisFox/Pokemon-Showdown.git","svn_url":"https://github.com/SolarisFox/Pokemon-Showdown","homepage":"http://pokemonshowdown.com","size":40835,"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":"Zarel:master","ref":"master","sha":"3ed7e06f06efa14d7d86617cba1c6f470ffb7a51","user":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"repo":{"id":3038446,"name":"Pokemon-Showdown","full_name":"Zarel/Pokemon-Showdown","owner":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zarel/Pokemon-Showdown","description":"Pokémon battle simulator.","fork":false,"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown","forks_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/forks","keys_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/teams","hooks_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/hooks","issue_events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/events{/number}","events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/events","assignees_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/assignees{/user}","branches_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/branches{/branch}","tags_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/tags","blobs_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/{sha}","languages_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/languages","stargazers_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/stargazers","contributors_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/contributors","subscribers_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/subscribers","subscription_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/subscription","commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/contents/{+path}","compare_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/merges","archive_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/downloads","issues_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues{/number}","pulls_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls{/number}","milestones_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/milestones{/number}","notifications_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/labels{/name}","releases_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/releases{/id}","created_at":"2011-12-23T04:52:33Z","updated_at":"2015-06-05T03:55:58Z","pushed_at":"2015-06-05T23:32:27Z","git_url":"git://github.com/Zarel/Pokemon-Showdown.git","ssh_url":"git@github.com:Zarel/Pokemon-Showdown.git","clone_url":"https://github.com/Zarel/Pokemon-Showdown.git","svn_url":"https://github.com/Zarel/Pokemon-Showdown","homepage":"http://pokemonshowdown.com","size":90652,"stargazers_count":514,"watchers_count":514,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":683,"mirror_url":null,"open_issues_count":34,"forks":683,"open_issues":34,"watchers":514,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915"},"html":{"href":"https://github.com/Zarel/Pokemon-Showdown/pull/1915"},"issue":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1915"},"comments":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1915/comments"},"review_comments":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915/comments"},"review_comment":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1915/commits"},"statuses":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/c60389d368d7919a2691cc536b9a2820a66900f5"}}}}