{"action":"created","comment":{"url":"https://api.github.com/repos/dirigeants/klasa/pulls/comments/222370783","pull_request_review_id":161241335,"id":222370783,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjM3MDc4Mw==","diff_hunk":"@@ -3,10 +3,19 @@ const { Inhibitor } = require('klasa');\n module.exports = class extends Inhibitor {\n \n \tasync run(message, command) {\n-\t\tif (!command.requiredSettings.length || message.channel.type !== 'text') return;\n-\t\t// eslint-disable-next-line eqeqeq\n-\t\tconst requiredSettings = command.requiredSettings.filter(setting => message.guild.settings.get(setting) == null);\n-\t\tif (requiredSettings.length) throw message.language.get('INHIBITOR_REQUIRED_SETTINGS', requiredSettings);\n+\t\tconst gateways = Object.keys(command.requiredSettings);\n+\t\tif (!gateways.length) return;\n+\n+\t\tconst missingSettings = [];\n+\n+\t\tfor (const gateway of gateways) {","path":"src/inhibitors/requiredSettings.js","position":13,"original_position":13,"commit_id":"2a6877b8d9fecd448f473235d6f5844c4f2a3848","original_commit_id":"2a6877b8d9fecd448f473235d6f5844c4f2a3848","user":{"login":"KingDGrizzle","id":17960496,"node_id":"MDQ6VXNlcjE3OTYwNDk2","avatar_url":"https://avatars3.githubusercontent.com/u/17960496?v=4","gravatar_id":"","url":"https://api.github.com/users/KingDGrizzle","html_url":"https://github.com/KingDGrizzle","followers_url":"https://api.github.com/users/KingDGrizzle/followers","following_url":"https://api.github.com/users/KingDGrizzle/following{/other_user}","gists_url":"https://api.github.com/users/KingDGrizzle/gists{/gist_id}","starred_url":"https://api.github.com/users/KingDGrizzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KingDGrizzle/subscriptions","organizations_url":"https://api.github.com/users/KingDGrizzle/orgs","repos_url":"https://api.github.com/users/KingDGrizzle/repos","events_url":"https://api.github.com/users/KingDGrizzle/events{/privacy}","received_events_url":"https://api.github.com/users/KingDGrizzle/received_events","type":"User","site_admin":false},"body":"Can't this use a for-of loop instead?","created_at":"2018-10-03T16:05:34Z","updated_at":"2018-10-03T16:05:40Z","html_url":"https://github.com/dirigeants/klasa/pull/436#discussion_r222370783","pull_request_url":"https://api.github.com/repos/dirigeants/klasa/pulls/436","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/comments/222370783"},"html":{"href":"https://github.com/dirigeants/klasa/pull/436#discussion_r222370783"},"pull_request":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/436"}}},"pull_request":{"url":"https://api.github.com/repos/dirigeants/klasa/pulls/436","id":219106825,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MTA2ODI1","html_url":"https://github.com/dirigeants/klasa/pull/436","diff_url":"https://github.com/dirigeants/klasa/pull/436.diff","patch_url":"https://github.com/dirigeants/klasa/pull/436.patch","issue_url":"https://api.github.com/repos/dirigeants/klasa/issues/436","number":436,"state":"open","locked":false,"title":"Enable Non-Guild Gateways For requiredSettings","user":{"login":"Skillz4Killz","id":23035000,"node_id":"MDQ6VXNlcjIzMDM1MDAw","avatar_url":"https://avatars3.githubusercontent.com/u/23035000?v=4","gravatar_id":"","url":"https://api.github.com/users/Skillz4Killz","html_url":"https://github.com/Skillz4Killz","followers_url":"https://api.github.com/users/Skillz4Killz/followers","following_url":"https://api.github.com/users/Skillz4Killz/following{/other_user}","gists_url":"https://api.github.com/users/Skillz4Killz/gists{/gist_id}","starred_url":"https://api.github.com/users/Skillz4Killz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skillz4Killz/subscriptions","organizations_url":"https://api.github.com/users/Skillz4Killz/orgs","repos_url":"https://api.github.com/users/Skillz4Killz/repos","events_url":"https://api.github.com/users/Skillz4Killz/events{/privacy}","received_events_url":"https://api.github.com/users/Skillz4Killz/received_events","type":"User","site_admin":false},"body":"### Description of the PR\r\n**BREAKING PR**\r\n\r\nCloses #435 \r\n\r\n### Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)\r\n\r\n- Converts `requiredSettings` from an array to an object that can hold arrays per gateway.\r\n\r\n```js\r\nrequiredSettings: {\r\n  guild: ['setting1', 'setting2'],\r\n  member: ['setting3', 'setting4'],\r\n  author: ['setting5', 'setting6']\r\n}\r\n```\r\n\r\n### Suggestion\r\n\r\nI would wait to merge this alongside another major breaking change to decrease the amount of breaking updates.\r\n\r\n### Semver Classification\r\n\r\n- [ ] This PR only includes documentation or non-code changes.\r\n- [ ] This PR fixes a bug and does not change the (intended) framework interface.\r\n- [ ] This PR adds methods or properties to the framework interface.\r\n- [ ] This PR removes or renames methods or properties in the framework interface.\r\n","created_at":"2018-09-28T23:17:41Z","updated_at":"2018-10-03T16:05:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cea91628fc8e2048fe8cc988210b61922ec5d7c2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":755751518,"node_id":"MDU6TGFiZWw3NTU3NTE1MTg=","url":"https://api.github.com/repos/dirigeants/klasa/labels/Meta:%20Feature","name":"Meta: Feature","color":"ffff00","default":false},{"id":681910328,"node_id":"MDU6TGFiZWw2ODE5MTAzMjg=","url":"https://api.github.com/repos/dirigeants/klasa/labels/Meta:%20Refactor","name":"Meta: Refactor","color":"ffff00","default":false},{"id":923510285,"node_id":"MDU6TGFiZWw5MjM1MTAyODU=","url":"https://api.github.com/repos/dirigeants/klasa/labels/Mod:%20SettingsGateway","name":"Mod: SettingsGateway","color":"2af9c9","default":false},{"id":768490050,"node_id":"MDU6TGFiZWw3Njg0OTAwNTA=","url":"https://api.github.com/repos/dirigeants/klasa/labels/SEM:%20Major","name":"SEM: Major","color":"9a35be","default":false},{"id":647285047,"node_id":"MDU6TGFiZWw2NDcyODUwNDc=","url":"https://api.github.com/repos/dirigeants/klasa/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dirigeants/klasa/pulls/436/commits","review_comments_url":"https://api.github.com/repos/dirigeants/klasa/pulls/436/comments","review_comment_url":"https://api.github.com/repos/dirigeants/klasa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dirigeants/klasa/issues/436/comments","statuses_url":"https://api.github.com/repos/dirigeants/klasa/statuses/2a6877b8d9fecd448f473235d6f5844c4f2a3848","head":{"label":"Skillz4Killz:dm-requiredSettings","ref":"dm-requiredSettings","sha":"2a6877b8d9fecd448f473235d6f5844c4f2a3848","user":{"login":"Skillz4Killz","id":23035000,"node_id":"MDQ6VXNlcjIzMDM1MDAw","avatar_url":"https://avatars3.githubusercontent.com/u/23035000?v=4","gravatar_id":"","url":"https://api.github.com/users/Skillz4Killz","html_url":"https://github.com/Skillz4Killz","followers_url":"https://api.github.com/users/Skillz4Killz/followers","following_url":"https://api.github.com/users/Skillz4Killz/following{/other_user}","gists_url":"https://api.github.com/users/Skillz4Killz/gists{/gist_id}","starred_url":"https://api.github.com/users/Skillz4Killz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skillz4Killz/subscriptions","organizations_url":"https://api.github.com/users/Skillz4Killz/orgs","repos_url":"https://api.github.com/users/Skillz4Killz/repos","events_url":"https://api.github.com/users/Skillz4Killz/events{/privacy}","received_events_url":"https://api.github.com/users/Skillz4Killz/received_events","type":"User","site_admin":false},"repo":{"id":139184929,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxODQ5Mjk=","name":"klasa","full_name":"Skillz4Killz/klasa","private":false,"owner":{"login":"Skillz4Killz","id":23035000,"node_id":"MDQ6VXNlcjIzMDM1MDAw","avatar_url":"https://avatars3.githubusercontent.com/u/23035000?v=4","gravatar_id":"","url":"https://api.github.com/users/Skillz4Killz","html_url":"https://github.com/Skillz4Killz","followers_url":"https://api.github.com/users/Skillz4Killz/followers","following_url":"https://api.github.com/users/Skillz4Killz/following{/other_user}","gists_url":"https://api.github.com/users/Skillz4Killz/gists{/gist_id}","starred_url":"https://api.github.com/users/Skillz4Killz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skillz4Killz/subscriptions","organizations_url":"https://api.github.com/users/Skillz4Killz/orgs","repos_url":"https://api.github.com/users/Skillz4Killz/repos","events_url":"https://api.github.com/users/Skillz4Killz/events{/privacy}","received_events_url":"https://api.github.com/users/Skillz4Killz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Skillz4Killz/klasa","description":"A class remix of the Komada Bot Framework","fork":true,"url":"https://api.github.com/repos/Skillz4Killz/klasa","forks_url":"https://api.github.com/repos/Skillz4Killz/klasa/forks","keys_url":"https://api.github.com/repos/Skillz4Killz/klasa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skillz4Killz/klasa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skillz4Killz/klasa/teams","hooks_url":"https://api.github.com/repos/Skillz4Killz/klasa/hooks","issue_events_url":"https://api.github.com/repos/Skillz4Killz/klasa/issues/events{/number}","events_url":"https://api.github.com/repos/Skillz4Killz/klasa/events","assignees_url":"https://api.github.com/repos/Skillz4Killz/klasa/assignees{/user}","branches_url":"https://api.github.com/repos/Skillz4Killz/klasa/branches{/branch}","tags_url":"https://api.github.com/repos/Skillz4Killz/klasa/tags","blobs_url":"https://api.github.com/repos/Skillz4Killz/klasa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skillz4Killz/klasa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skillz4Killz/klasa/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skillz4Killz/klasa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skillz4Killz/klasa/statuses/{sha}","languages_url":"https://api.github.com/repos/Skillz4Killz/klasa/languages","stargazers_url":"https://api.github.com/repos/Skillz4Killz/klasa/stargazers","contributors_url":"https://api.github.com/repos/Skillz4Killz/klasa/contributors","subscribers_url":"https://api.github.com/repos/Skillz4Killz/klasa/subscribers","subscription_url":"https://api.github.com/repos/Skillz4Killz/klasa/subscription","commits_url":"https://api.github.com/repos/Skillz4Killz/klasa/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skillz4Killz/klasa/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skillz4Killz/klasa/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skillz4Killz/klasa/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skillz4Killz/klasa/contents/{+path}","compare_url":"https://api.github.com/repos/Skillz4Killz/klasa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skillz4Killz/klasa/merges","archive_url":"https://api.github.com/repos/Skillz4Killz/klasa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skillz4Killz/klasa/downloads","issues_url":"https://api.github.com/repos/Skillz4Killz/klasa/issues{/number}","pulls_url":"https://api.github.com/repos/Skillz4Killz/klasa/pulls{/number}","milestones_url":"https://api.github.com/repos/Skillz4Killz/klasa/milestones{/number}","notifications_url":"https://api.github.com/repos/Skillz4Killz/klasa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skillz4Killz/klasa/labels{/name}","releases_url":"https://api.github.com/repos/Skillz4Killz/klasa/releases{/id}","deployments_url":"https://api.github.com/repos/Skillz4Killz/klasa/deployments","created_at":"2018-06-29T18:52:42Z","updated_at":"2018-10-01T15:04:55Z","pushed_at":"2018-10-03T15:43:12Z","git_url":"git://github.com/Skillz4Killz/klasa.git","ssh_url":"git@github.com:Skillz4Killz/klasa.git","clone_url":"https://github.com/Skillz4Killz/klasa.git","svn_url":"https://github.com/Skillz4Killz/klasa","homepage":"https://klasa.js.org","size":6520,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dirigeants:settings","ref":"settings","sha":"96cc12de8480df163e82744599dacfc719bb4c12","user":{"login":"dirigeants","id":25160727,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MTYwNzI3","avatar_url":"https://avatars0.githubusercontent.com/u/25160727?v=4","gravatar_id":"","url":"https://api.github.com/users/dirigeants","html_url":"https://github.com/dirigeants","followers_url":"https://api.github.com/users/dirigeants/followers","following_url":"https://api.github.com/users/dirigeants/following{/other_user}","gists_url":"https://api.github.com/users/dirigeants/gists{/gist_id}","starred_url":"https://api.github.com/users/dirigeants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirigeants/subscriptions","organizations_url":"https://api.github.com/users/dirigeants/orgs","repos_url":"https://api.github.com/users/dirigeants/repos","events_url":"https://api.github.com/users/dirigeants/events{/privacy}","received_events_url":"https://api.github.com/users/dirigeants/received_events","type":"Organization","site_admin":false},"repo":{"id":97268750,"node_id":"MDEwOlJlcG9zaXRvcnk5NzI2ODc1MA==","name":"klasa","full_name":"dirigeants/klasa","private":false,"owner":{"login":"dirigeants","id":25160727,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MTYwNzI3","avatar_url":"https://avatars0.githubusercontent.com/u/25160727?v=4","gravatar_id":"","url":"https://api.github.com/users/dirigeants","html_url":"https://github.com/dirigeants","followers_url":"https://api.github.com/users/dirigeants/followers","following_url":"https://api.github.com/users/dirigeants/following{/other_user}","gists_url":"https://api.github.com/users/dirigeants/gists{/gist_id}","starred_url":"https://api.github.com/users/dirigeants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirigeants/subscriptions","organizations_url":"https://api.github.com/users/dirigeants/orgs","repos_url":"https://api.github.com/users/dirigeants/repos","events_url":"https://api.github.com/users/dirigeants/events{/privacy}","received_events_url":"https://api.github.com/users/dirigeants/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dirigeants/klasa","description":"A class remix of the Komada Bot Framework","fork":false,"url":"https://api.github.com/repos/dirigeants/klasa","forks_url":"https://api.github.com/repos/dirigeants/klasa/forks","keys_url":"https://api.github.com/repos/dirigeants/klasa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dirigeants/klasa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dirigeants/klasa/teams","hooks_url":"https://api.github.com/repos/dirigeants/klasa/hooks","issue_events_url":"https://api.github.com/repos/dirigeants/klasa/issues/events{/number}","events_url":"https://api.github.com/repos/dirigeants/klasa/events","assignees_url":"https://api.github.com/repos/dirigeants/klasa/assignees{/user}","branches_url":"https://api.github.com/repos/dirigeants/klasa/branches{/branch}","tags_url":"https://api.github.com/repos/dirigeants/klasa/tags","blobs_url":"https://api.github.com/repos/dirigeants/klasa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dirigeants/klasa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dirigeants/klasa/git/refs{/sha}","trees_url":"https://api.github.com/repos/dirigeants/klasa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dirigeants/klasa/statuses/{sha}","languages_url":"https://api.github.com/repos/dirigeants/klasa/languages","stargazers_url":"https://api.github.com/repos/dirigeants/klasa/stargazers","contributors_url":"https://api.github.com/repos/dirigeants/klasa/contributors","subscribers_url":"https://api.github.com/repos/dirigeants/klasa/subscribers","subscription_url":"https://api.github.com/repos/dirigeants/klasa/subscription","commits_url":"https://api.github.com/repos/dirigeants/klasa/commits{/sha}","git_commits_url":"https://api.github.com/repos/dirigeants/klasa/git/commits{/sha}","comments_url":"https://api.github.com/repos/dirigeants/klasa/comments{/number}","issue_comment_url":"https://api.github.com/repos/dirigeants/klasa/issues/comments{/number}","contents_url":"https://api.github.com/repos/dirigeants/klasa/contents/{+path}","compare_url":"https://api.github.com/repos/dirigeants/klasa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dirigeants/klasa/merges","archive_url":"https://api.github.com/repos/dirigeants/klasa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dirigeants/klasa/downloads","issues_url":"https://api.github.com/repos/dirigeants/klasa/issues{/number}","pulls_url":"https://api.github.com/repos/dirigeants/klasa/pulls{/number}","milestones_url":"https://api.github.com/repos/dirigeants/klasa/milestones{/number}","notifications_url":"https://api.github.com/repos/dirigeants/klasa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dirigeants/klasa/labels{/name}","releases_url":"https://api.github.com/repos/dirigeants/klasa/releases{/id}","deployments_url":"https://api.github.com/repos/dirigeants/klasa/deployments","created_at":"2017-07-14T20:01:50Z","updated_at":"2018-10-03T00:38:44Z","pushed_at":"2018-10-03T15:43:13Z","git_url":"git://github.com/dirigeants/klasa.git","ssh_url":"git@github.com:dirigeants/klasa.git","clone_url":"https://github.com/dirigeants/klasa.git","svn_url":"https://github.com/dirigeants/klasa","homepage":"https://klasa.js.org","size":7811,"stargazers_count":91,"watchers_count":91,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":53,"open_issues":17,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/436"},"html":{"href":"https://github.com/dirigeants/klasa/pull/436"},"issue":{"href":"https://api.github.com/repos/dirigeants/klasa/issues/436"},"comments":{"href":"https://api.github.com/repos/dirigeants/klasa/issues/436/comments"},"review_comments":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/436/comments"},"review_comment":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dirigeants/klasa/pulls/436/commits"},"statuses":{"href":"https://api.github.com/repos/dirigeants/klasa/statuses/2a6877b8d9fecd448f473235d6f5844c4f2a3848"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"KingDGrizzle"}}