{"action":"created","issue":{"url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/130","repository_url":"https://api.github.com/repos/JsSucks/BetterDiscordApp","labels_url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/130/comments","events_url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/130/events","html_url":"https://github.com/JsSucks/BetterDiscordApp/pull/130","id":296924385,"number":130,"title":"Add setting change events","user":{"login":"samuelthomas2774","id":8474065,"avatar_url":"https://avatars2.githubusercontent.com/u/8474065?v=4","gravatar_id":"","url":"https://api.github.com/users/samuelthomas2774","html_url":"https://github.com/samuelthomas2774","followers_url":"https://api.github.com/users/samuelthomas2774/followers","following_url":"https://api.github.com/users/samuelthomas2774/following{/other_user}","gists_url":"https://api.github.com/users/samuelthomas2774/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelthomas2774/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelthomas2774/subscriptions","organizations_url":"https://api.github.com/users/samuelthomas2774/orgs","repos_url":"https://api.github.com/users/samuelthomas2774/repos","events_url":"https://api.github.com/users/samuelthomas2774/events{/privacy}","received_events_url":"https://api.github.com/users/samuelthomas2774/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-13T23:32:35Z","updated_at":"2018-02-13T23:43:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/pulls/130","html_url":"https://github.com/JsSucks/BetterDiscordApp/pull/130","diff_url":"https://github.com/JsSucks/BetterDiscordApp/pull/130.diff","patch_url":"https://github.com/JsSucks/BetterDiscordApp/pull/130.patch"},"body":"Anything can listen for internal setting changes with:\r\n\r\n```js\r\nEvents.on('setting-updated', event => {\r\n    console.log('Received internal setting update:', event);\r\n    // event instanceof SettingUpdatedEvent\r\n});\r\n\r\n```\r\n\r\nPlugins can listen for their own setting changes with:\r\n\r\n```js\r\nthis.events.on('setting-updated', event => {\r\n    console.log('Received plugin setting update:', event);\r\n    // event instanceof SettingUpdatedEvent\r\n});\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/comments/365444329","html_url":"https://github.com/JsSucks/BetterDiscordApp/pull/130#issuecomment-365444329","issue_url":"https://api.github.com/repos/JsSucks/BetterDiscordApp/issues/130","id":365444329,"user":{"login":"samuelthomas2774","id":8474065,"avatar_url":"https://avatars2.githubusercontent.com/u/8474065?v=4","gravatar_id":"","url":"https://api.github.com/users/samuelthomas2774","html_url":"https://github.com/samuelthomas2774","followers_url":"https://api.github.com/users/samuelthomas2774/followers","following_url":"https://api.github.com/users/samuelthomas2774/following{/other_user}","gists_url":"https://api.github.com/users/samuelthomas2774/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelthomas2774/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelthomas2774/subscriptions","organizations_url":"https://api.github.com/users/samuelthomas2774/orgs","repos_url":"https://api.github.com/users/samuelthomas2774/repos","events_url":"https://api.github.com/users/samuelthomas2774/events{/privacy}","received_events_url":"https://api.github.com/users/samuelthomas2774/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T23:43:30Z","updated_at":"2018-02-13T23:43:30Z","author_association":"NONE","body":"No in a plugin it would be:\r\n\r\n```js\r\nApi.Events.subscribe('setting-updated', event => {\r\n    console.log('Received internal setting update:', event);\r\n    // event instanceof SettingUpdatedEvent\r\n});\r\n```\r\n\r\nPlugins get their own EventEmitter for their own settings."}}
{"actor":{"display_login":"samuelthomas2774"}}