{"action":"created","comment":{"url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/comments/146639120","pull_request_review_id":71610414,"id":146639120,"diff_hunk":"@@ -99,6 +103,30 @@ private void setConfig(CommandContext context) {\n                     context.reply(context.i18nFormat(\"configMustBeBoolean\", invoker.getEffectiveName()));\n                 }\n                 break;\n+            case \"allow_playlist\":\n+                if (val.equalsIgnoreCase(\"true\") | val.equalsIgnoreCase(\"false\")) {\n+                    gc.setAllowPlaylist(Boolean.valueOf(val));\n+                    EntityWriter.mergeGuildConfig(gc);\n+                    context.replyWithName(\"`allow_playlist` \" + context.i18nFormat(\"configSetTo\", val));\n+                } else {\n+                    context.replyWithName(context.i18n(\"configMustBeBoolean\"));\n+                }\n+                break;\n+            case \"member_track_limit\":\n+                if (val.matches(\"^\\\\d+$\")) {\n+                    gc.setMemberTrackLimit(Integer.valueOf(val));\n+                    EntityWriter.mergeGuildConfig(gc);\n+                    context.replyWithName(\"`member_track_limit` \" + context.i18nFormat(\"configSetTo\", val));\n+                } else {\n+                    context.replyWithName(context.i18n(\"configMustBeNumber\"));\n+                }\n+                break;\n+            case \"max_track_duration\":\n+                Long time = TextUtils.parseTimeString(val); // We should handle failed parses better than throwing tbh.","path":"FredBoat/src/main/java/fredboat/command/moderation/ConfigCommand.java","position":41,"original_position":41,"commit_id":"06f20599009c54ecbb0009c94a339072384b33c9","original_commit_id":"06f20599009c54ecbb0009c94a339072384b33c9","user":{"login":"napstr","id":6048348,"avatar_url":"https://avatars3.githubusercontent.com/u/6048348?v=4","gravatar_id":"","url":"https://api.github.com/users/napstr","html_url":"https://github.com/napstr","followers_url":"https://api.github.com/users/napstr/followers","following_url":"https://api.github.com/users/napstr/following{/other_user}","gists_url":"https://api.github.com/users/napstr/gists{/gist_id}","starred_url":"https://api.github.com/users/napstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napstr/subscriptions","organizations_url":"https://api.github.com/users/napstr/orgs","repos_url":"https://api.github.com/users/napstr/repos","events_url":"https://api.github.com/users/napstr/events{/privacy}","received_events_url":"https://api.github.com/users/napstr/received_events","type":"User","site_admin":false},"body":"> // We should handle failed parses better than throwing tbh\r\n\r\nNo, catching NumberFormatExceptions is fine. It is not the cleanest solution there is but certainly the less verbose one. And it is missing here.","created_at":"2017-10-24T17:45:32Z","updated_at":"2017-10-24T17:45:33Z","html_url":"https://github.com/Frederikam/FredBoat/pull/372#discussion_r146639120","pull_request_url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/comments/146639120"},"html":{"href":"https://github.com/Frederikam/FredBoat/pull/372#discussion_r146639120"},"pull_request":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372"}}},"pull_request":{"url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372","id":147961006,"html_url":"https://github.com/Frederikam/FredBoat/pull/372","diff_url":"https://github.com/Frederikam/FredBoat/pull/372.diff","patch_url":"https://github.com/Frederikam/FredBoat/pull/372.patch","issue_url":"https://api.github.com/repos/Frederikam/FredBoat/issues/372","number":372,"state":"open","locked":false,"title":"Feature/player limitations","user":{"login":"Nanabell","id":13600006,"avatar_url":"https://avatars1.githubusercontent.com/u/13600006?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanabell","html_url":"https://github.com/Nanabell","followers_url":"https://api.github.com/users/Nanabell/followers","following_url":"https://api.github.com/users/Nanabell/following{/other_user}","gists_url":"https://api.github.com/users/Nanabell/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanabell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanabell/subscriptions","organizations_url":"https://api.github.com/users/Nanabell/orgs","repos_url":"https://api.github.com/users/Nanabell/repos","events_url":"https://api.github.com/users/Nanabell/events{/privacy}","received_events_url":"https://api.github.com/users/Nanabell/received_events","type":"User","site_admin":false},"body":"This pr will allow guilds to limit their players in multiple ways.\r\nCurrently supported: \r\n- Disallow playlists\r\n- limit per user songs (i.e. how many songs a user can queue)\r\n- limit song length\r\n\r\nat the moment `allow_playlist` is only limited to users with `USER` permission as `DJ` bypasses this. \r\nShould this be the case for all of these checks or should they be enforced for everyone? I was indecisive on this one so I want your feedback b4 this can be merged","created_at":"2017-10-21T20:20:40Z","updated_at":"2017-10-24T17:45:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16d0a9c75164ca6901a4a1d97de55e4a5769cf11","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372/commits","review_comments_url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372/comments","review_comment_url":"https://api.github.com/repos/Frederikam/FredBoat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Frederikam/FredBoat/issues/372/comments","statuses_url":"https://api.github.com/repos/Frederikam/FredBoat/statuses/06f20599009c54ecbb0009c94a339072384b33c9","head":{"label":"Nanabell:feature/playerLimitations","ref":"feature/playerLimitations","sha":"06f20599009c54ecbb0009c94a339072384b33c9","user":{"login":"Nanabell","id":13600006,"avatar_url":"https://avatars1.githubusercontent.com/u/13600006?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanabell","html_url":"https://github.com/Nanabell","followers_url":"https://api.github.com/users/Nanabell/followers","following_url":"https://api.github.com/users/Nanabell/following{/other_user}","gists_url":"https://api.github.com/users/Nanabell/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanabell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanabell/subscriptions","organizations_url":"https://api.github.com/users/Nanabell/orgs","repos_url":"https://api.github.com/users/Nanabell/repos","events_url":"https://api.github.com/users/Nanabell/events{/privacy}","received_events_url":"https://api.github.com/users/Nanabell/received_events","type":"User","site_admin":false},"repo":{"id":85163484,"name":"FredBoat","full_name":"Nanabell/FredBoat","owner":{"login":"Nanabell","id":13600006,"avatar_url":"https://avatars1.githubusercontent.com/u/13600006?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanabell","html_url":"https://github.com/Nanabell","followers_url":"https://api.github.com/users/Nanabell/followers","following_url":"https://api.github.com/users/Nanabell/following{/other_user}","gists_url":"https://api.github.com/users/Nanabell/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanabell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanabell/subscriptions","organizations_url":"https://api.github.com/users/Nanabell/orgs","repos_url":"https://api.github.com/users/Nanabell/repos","events_url":"https://api.github.com/users/Nanabell/events{/privacy}","received_events_url":"https://api.github.com/users/Nanabell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nanabell/FredBoat","description":"A free distributed Discord music bot hosted for free for tens of thousands of servers","fork":true,"url":"https://api.github.com/repos/Nanabell/FredBoat","forks_url":"https://api.github.com/repos/Nanabell/FredBoat/forks","keys_url":"https://api.github.com/repos/Nanabell/FredBoat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nanabell/FredBoat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nanabell/FredBoat/teams","hooks_url":"https://api.github.com/repos/Nanabell/FredBoat/hooks","issue_events_url":"https://api.github.com/repos/Nanabell/FredBoat/issues/events{/number}","events_url":"https://api.github.com/repos/Nanabell/FredBoat/events","assignees_url":"https://api.github.com/repos/Nanabell/FredBoat/assignees{/user}","branches_url":"https://api.github.com/repos/Nanabell/FredBoat/branches{/branch}","tags_url":"https://api.github.com/repos/Nanabell/FredBoat/tags","blobs_url":"https://api.github.com/repos/Nanabell/FredBoat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nanabell/FredBoat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nanabell/FredBoat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nanabell/FredBoat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nanabell/FredBoat/statuses/{sha}","languages_url":"https://api.github.com/repos/Nanabell/FredBoat/languages","stargazers_url":"https://api.github.com/repos/Nanabell/FredBoat/stargazers","contributors_url":"https://api.github.com/repos/Nanabell/FredBoat/contributors","subscribers_url":"https://api.github.com/repos/Nanabell/FredBoat/subscribers","subscription_url":"https://api.github.com/repos/Nanabell/FredBoat/subscription","commits_url":"https://api.github.com/repos/Nanabell/FredBoat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nanabell/FredBoat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nanabell/FredBoat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nanabell/FredBoat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nanabell/FredBoat/contents/{+path}","compare_url":"https://api.github.com/repos/Nanabell/FredBoat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nanabell/FredBoat/merges","archive_url":"https://api.github.com/repos/Nanabell/FredBoat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nanabell/FredBoat/downloads","issues_url":"https://api.github.com/repos/Nanabell/FredBoat/issues{/number}","pulls_url":"https://api.github.com/repos/Nanabell/FredBoat/pulls{/number}","milestones_url":"https://api.github.com/repos/Nanabell/FredBoat/milestones{/number}","notifications_url":"https://api.github.com/repos/Nanabell/FredBoat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nanabell/FredBoat/labels{/name}","releases_url":"https://api.github.com/repos/Nanabell/FredBoat/releases{/id}","deployments_url":"https://api.github.com/repos/Nanabell/FredBoat/deployments","created_at":"2017-03-16T07:02:26Z","updated_at":"2017-03-16T07:02:28Z","pushed_at":"2017-10-24T12:06:00Z","git_url":"git://github.com/Nanabell/FredBoat.git","ssh_url":"git@github.com:Nanabell/FredBoat.git","clone_url":"https://github.com/Nanabell/FredBoat.git","svn_url":"https://github.com/Nanabell/FredBoat","homepage":"http://docs.frederikam.com","size":7022,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Frederikam:development","ref":"development","sha":"0afc9294c46a7ffa2bba4e62c33cd845bb2d2cdd","user":{"login":"Frederikam","id":2582617,"avatar_url":"https://avatars0.githubusercontent.com/u/2582617?v=4","gravatar_id":"","url":"https://api.github.com/users/Frederikam","html_url":"https://github.com/Frederikam","followers_url":"https://api.github.com/users/Frederikam/followers","following_url":"https://api.github.com/users/Frederikam/following{/other_user}","gists_url":"https://api.github.com/users/Frederikam/gists{/gist_id}","starred_url":"https://api.github.com/users/Frederikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frederikam/subscriptions","organizations_url":"https://api.github.com/users/Frederikam/orgs","repos_url":"https://api.github.com/users/Frederikam/repos","events_url":"https://api.github.com/users/Frederikam/events{/privacy}","received_events_url":"https://api.github.com/users/Frederikam/received_events","type":"User","site_admin":false},"repo":{"id":53135203,"name":"FredBoat","full_name":"Frederikam/FredBoat","owner":{"login":"Frederikam","id":2582617,"avatar_url":"https://avatars0.githubusercontent.com/u/2582617?v=4","gravatar_id":"","url":"https://api.github.com/users/Frederikam","html_url":"https://github.com/Frederikam","followers_url":"https://api.github.com/users/Frederikam/followers","following_url":"https://api.github.com/users/Frederikam/following{/other_user}","gists_url":"https://api.github.com/users/Frederikam/gists{/gist_id}","starred_url":"https://api.github.com/users/Frederikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frederikam/subscriptions","organizations_url":"https://api.github.com/users/Frederikam/orgs","repos_url":"https://api.github.com/users/Frederikam/repos","events_url":"https://api.github.com/users/Frederikam/events{/privacy}","received_events_url":"https://api.github.com/users/Frederikam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Frederikam/FredBoat","description":"A Discord music bot","fork":false,"url":"https://api.github.com/repos/Frederikam/FredBoat","forks_url":"https://api.github.com/repos/Frederikam/FredBoat/forks","keys_url":"https://api.github.com/repos/Frederikam/FredBoat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Frederikam/FredBoat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Frederikam/FredBoat/teams","hooks_url":"https://api.github.com/repos/Frederikam/FredBoat/hooks","issue_events_url":"https://api.github.com/repos/Frederikam/FredBoat/issues/events{/number}","events_url":"https://api.github.com/repos/Frederikam/FredBoat/events","assignees_url":"https://api.github.com/repos/Frederikam/FredBoat/assignees{/user}","branches_url":"https://api.github.com/repos/Frederikam/FredBoat/branches{/branch}","tags_url":"https://api.github.com/repos/Frederikam/FredBoat/tags","blobs_url":"https://api.github.com/repos/Frederikam/FredBoat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Frederikam/FredBoat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Frederikam/FredBoat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Frederikam/FredBoat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Frederikam/FredBoat/statuses/{sha}","languages_url":"https://api.github.com/repos/Frederikam/FredBoat/languages","stargazers_url":"https://api.github.com/repos/Frederikam/FredBoat/stargazers","contributors_url":"https://api.github.com/repos/Frederikam/FredBoat/contributors","subscribers_url":"https://api.github.com/repos/Frederikam/FredBoat/subscribers","subscription_url":"https://api.github.com/repos/Frederikam/FredBoat/subscription","commits_url":"https://api.github.com/repos/Frederikam/FredBoat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Frederikam/FredBoat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Frederikam/FredBoat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Frederikam/FredBoat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Frederikam/FredBoat/contents/{+path}","compare_url":"https://api.github.com/repos/Frederikam/FredBoat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Frederikam/FredBoat/merges","archive_url":"https://api.github.com/repos/Frederikam/FredBoat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Frederikam/FredBoat/downloads","issues_url":"https://api.github.com/repos/Frederikam/FredBoat/issues{/number}","pulls_url":"https://api.github.com/repos/Frederikam/FredBoat/pulls{/number}","milestones_url":"https://api.github.com/repos/Frederikam/FredBoat/milestones{/number}","notifications_url":"https://api.github.com/repos/Frederikam/FredBoat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Frederikam/FredBoat/labels{/name}","releases_url":"https://api.github.com/repos/Frederikam/FredBoat/releases{/id}","deployments_url":"https://api.github.com/repos/Frederikam/FredBoat/deployments","created_at":"2016-03-04T12:51:03Z","updated_at":"2017-10-23T19:27:14Z","pushed_at":"2017-10-24T12:06:02Z","git_url":"git://github.com/Frederikam/FredBoat.git","ssh_url":"git@github.com:Frederikam/FredBoat.git","clone_url":"https://github.com/Frederikam/FredBoat.git","svn_url":"https://github.com/Frederikam/FredBoat","homepage":"https://fredboat.com/docs","size":7188,"stargazers_count":121,"watchers_count":121,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":76,"forks":99,"open_issues":76,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372"},"html":{"href":"https://github.com/Frederikam/FredBoat/pull/372"},"issue":{"href":"https://api.github.com/repos/Frederikam/FredBoat/issues/372"},"comments":{"href":"https://api.github.com/repos/Frederikam/FredBoat/issues/372/comments"},"review_comments":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372/comments"},"review_comment":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Frederikam/FredBoat/pulls/372/commits"},"statuses":{"href":"https://api.github.com/repos/Frederikam/FredBoat/statuses/06f20599009c54ecbb0009c94a339072384b33c9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"napstr"}}