{"action":"closed","issue":{"url":"https://api.github.com/repos/Devcord/cordlr/issues/34","repository_url":"https://api.github.com/repos/Devcord/cordlr","labels_url":"https://api.github.com/repos/Devcord/cordlr/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/Devcord/cordlr/issues/34/comments","events_url":"https://api.github.com/repos/Devcord/cordlr/issues/34/events","html_url":"https://github.com/Devcord/cordlr/issues/34","id":177148766,"number":34,"title":"Rename \"actions\" to \"scripts\"","user":{"login":"jamen","id":6251703,"avatar_url":"https://avatars.githubusercontent.com/u/6251703?v=3","gravatar_id":"","url":"https://api.github.com/users/jamen","html_url":"https://github.com/jamen","followers_url":"https://api.github.com/users/jamen/followers","following_url":"https://api.github.com/users/jamen/following{/other_user}","gists_url":"https://api.github.com/users/jamen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamen/subscriptions","organizations_url":"https://api.github.com/users/jamen/orgs","repos_url":"https://api.github.com/users/jamen/repos","events_url":"https://api.github.com/users/jamen/events{/privacy}","received_events_url":"https://api.github.com/users/jamen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jamen","id":6251703,"avatar_url":"https://avatars.githubusercontent.com/u/6251703?v=3","gravatar_id":"","url":"https://api.github.com/users/jamen","html_url":"https://github.com/jamen","followers_url":"https://api.github.com/users/jamen/followers","following_url":"https://api.github.com/users/jamen/following{/other_user}","gists_url":"https://api.github.com/users/jamen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamen/subscriptions","organizations_url":"https://api.github.com/users/jamen/orgs","repos_url":"https://api.github.com/users/jamen/repos","events_url":"https://api.github.com/users/jamen/events{/privacy}","received_events_url":"https://api.github.com/users/jamen/received_events","type":"User","site_admin":false},"assignees":[{"login":"jamen","id":6251703,"avatar_url":"https://avatars.githubusercontent.com/u/6251703?v=3","gravatar_id":"","url":"https://api.github.com/users/jamen","html_url":"https://github.com/jamen","followers_url":"https://api.github.com/users/jamen/followers","following_url":"https://api.github.com/users/jamen/following{/other_user}","gists_url":"https://api.github.com/users/jamen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamen/subscriptions","organizations_url":"https://api.github.com/users/jamen/orgs","repos_url":"https://api.github.com/users/jamen/repos","events_url":"https://api.github.com/users/jamen/events{/privacy}","received_events_url":"https://api.github.com/users/jamen/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-09-15T11:08:36Z","updated_at":"2016-09-16T07:22:01Z","closed_at":"2016-09-16T07:22:01Z","body":"I think this name change would be good.\r\n\r\nScripts are a `function` that:\r\n - Set event handlers on `bot`\r\n - Access the `config` object (shared with all scripts)\r\n - Has properties that define \"traits\" of the script. (name, usage, etc.)\r\n - Can optionally handle chat commands, by returning a `run` function.\r\n\r\nA script module named `foo` that can be run as a command would look like this:\r\n\r\n```js\r\nmodule.exports = foo\r\n\r\nfoo.command = 'foo'\r\nfoo.usage = 'foo <bar> [...baz]'\r\nfoo.desc = 'Does amazing things'\r\n// ...\r\n\r\nfunction foo (bot, config) {\r\n  // the script is initialized here.\r\n  // bind your own events on `bot`\r\n  // also use `config`, this is shared.\r\n\r\n  // return a run handler to make the script a command\r\n  return function run (message, args, flags) {\r\n    // do something when command is run here.\r\n  }\r\n}\r\n```\r\n\r\nA script named `bar` that has no command would look like this:\r\n\r\n```js\r\nmodule.exports = bar\r\n\r\nbar.desc = 'Greets the user'\r\n// ...\r\n\r\nfunction bar (bot, config) {\r\n  bot.on('message', function (message) {\r\n    // Handle any message ...\r\n  });\r\n\r\n  // Don't return a `run` handler, for no command.\r\n}\r\n```\r\n(No command scripts would be for things like analytics, new user greeting, etc.)"}}
{"actor":{"display_login":"jamen"}}