{"_id":"575a44f6ba4ed70e000ca0ee","category":{"_id":"57590cd318760817001e8a83","__v":0,"project":"571193ce8103870e00f48b67","version":"57590727ace5c30e00cb23d7","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-09T06:29:39.417Z","from_sync":false,"order":1,"slug":"parts","title":"Parts"},"project":"571193ce8103870e00f48b67","user":"571193c63590a50e00bba99d","__v":7,"githubsync":"","version":{"_id":"57590727ace5c30e00cb23d7","__v":2,"project":"571193ce8103870e00f48b67","createdAt":"2016-06-09T06:05:27.924Z","releaseDate":"2016-06-09T06:05:27.924Z","categories":["57590727ace5c30e00cb23d8","57590cd318760817001e8a83"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"4.0.0","version":"4.0.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-10T04:41:26.252Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"A role belongs to a guild and holds member objects. It sets the permissions for these members.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Attributes\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"id\",\n    \"1-0\": \"name\",\n    \"2-0\": \"color\",\n    \"3-0\": \"managed\",\n    \"4-0\": \"hoist\",\n    \"5-0\": \"position\",\n    \"6-0\": \"permissions\",\n    \"7-0\": \"guild_id\",\n    \"0-1\": \"The unique identifier of the role.\",\n    \"0-2\": \"snowflake\",\n    \"1-1\": \"The name of the role.\",\n    \"1-2\": \"string\",\n    \"2-1\": \"The color that the role appears as on the sidebar. Set using the `setColor()` function.\",\n    \"2-2\": \"string\",\n    \"3-1\": \"Whether the role is managed by an integration e.g. Twitch Subscriptions\",\n    \"3-2\": \"bool\",\n    \"4-1\": \"Whether the role is hoisted on the user list.\",\n    \"4-2\": \"bool\",\n    \"5-1\": \"The position of the role in the role list.\",\n    \"5-2\": \"int\",\n    \"6-1\": \"A bitwise integer that contains the permissions. See [Permission](doc:permission).\",\n    \"6-2\": \"int\",\n    \"7-1\": \"The unique identifier of the guild that the role belongs to.\",\n    \"7-2\": \"snowflake\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"fn\",\n  \"title\": \"setColor($red, $green, $blue)\"\n}\n[/block]\nSets the color attribute on the role. Colors should be in RGB format (from 0-255).\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Default\",\n    \"0-0\": \"`$red`\",\n    \"0-1\": \"The red RGB value.\",\n    \"0-2\": \"int\",\n    \"0-3\": \"`null`\",\n    \"1-0\": \"`$green`\",\n    \"1-1\": \"The green RGB value.\",\n    \"1-2\": \"int\",\n    \"1-3\": \"`null`\",\n    \"2-0\": \"`$blue`\",\n    \"2-1\": \"The blue RGB value.\",\n    \"2-2\": \"int\",\n    \"2-3\": \"`null`\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]","excerpt":"A role belongs to a guild and handles permission.","slug":"role","type":"basic","title":"Role"}

Role

A role belongs to a guild and handles permission.

A role belongs to a guild and holds member objects. It sets the permissions for these members. [block:api-header] { "type": "basic", "title": "Attributes" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Type", "0-0": "id", "1-0": "name", "2-0": "color", "3-0": "managed", "4-0": "hoist", "5-0": "position", "6-0": "permissions", "7-0": "guild_id", "0-1": "The unique identifier of the role.", "0-2": "snowflake", "1-1": "The name of the role.", "1-2": "string", "2-1": "The color that the role appears as on the sidebar. Set using the `setColor()` function.", "2-2": "string", "3-1": "Whether the role is managed by an integration e.g. Twitch Subscriptions", "3-2": "bool", "4-1": "Whether the role is hoisted on the user list.", "4-2": "bool", "5-1": "The position of the role in the role list.", "5-2": "int", "6-1": "A bitwise integer that contains the permissions. See [Permission](doc:permission).", "6-2": "int", "7-1": "The unique identifier of the guild that the role belongs to.", "7-2": "snowflake" }, "cols": 3, "rows": 8 } [/block] [block:api-header] { "type": "fn", "title": "setColor($red, $green, $blue)" } [/block] Sets the color attribute on the role. Colors should be in RGB format (from 0-255). [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Default", "0-0": "`$red`", "0-1": "The red RGB value.", "0-2": "int", "0-3": "`null`", "1-0": "`$green`", "1-1": "The green RGB value.", "1-2": "int", "1-3": "`null`", "2-0": "`$blue`", "2-1": "The blue RGB value.", "2-2": "int", "2-3": "`null`" }, "cols": 4, "rows": 3 } [/block]