{"_id":"5759388318760817001e8b34","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"},"__v":21,"project":"571193ce8103870e00f48b67","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"},"user":"571193c63590a50e00bba99d","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-09T09:36:03.223Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"The guild object is often referred to as a `server`. It holds roles, members, channels, bans, invites etc.\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    \"0-1\": \"The unique identifier of the Guild.\",\n    \"0-2\": \"snowflake\",\n    \"1-0\": \"name\",\n    \"1-1\": \"The name of the guild.\",\n    \"1-2\": \"string\",\n    \"2-0\": \"icon\",\n    \"2-1\": \"The URL to the guild icon.\",\n    \"2-2\": \"string\",\n    \"4-0\": \"region\",\n    \"4-1\": \"The region the guild voice servers are hosted in.\",\n    \"4-2\": \"string\",\n    \"5-0\": \"owner_id\",\n    \"5-1\": \"The unique identifier of the owner of the guild.\",\n    \"5-2\": \"snowflake\",\n    \"7-0\": \"joined_at\",\n    \"7-1\": \"A timestamp of when the bot joined the guild.\",\n    \"7-2\": \"Carbon\",\n    \"8-0\": \"afk_channel_id\",\n    \"8-1\": \"The unique identifier of the AFK voice channel.\",\n    \"8-2\": \"snowflake\",\n    \"10-0\": \"embed_enabled\",\n    \"10-1\": \"Whether the embed is enabled.\",\n    \"10-2\": \"bool\",\n    \"11-0\": \"embed_channel_id\",\n    \"11-1\": \"The unique identifier of the embedded channel.\",\n    \"11-2\": \"bool\",\n    \"12-0\": \"features\",\n    \"12-1\": \"An array of features the guild has.\",\n    \"12-2\": \"array[object]\",\n    \"13-0\": \"splash\",\n    \"13-1\": \"The URL to the guild splash screen (VIP only).\",\n    \"13-2\": \"string\",\n    \"15-0\": \"emojis\",\n    \"15-1\": \"An array of emojis the guild has access to.\",\n    \"15-2\": \"array[object]\",\n    \"16-0\": \"large\",\n    \"16-1\": \"Whether the guild is considered large (over 250 members).\",\n    \"16-2\": \"bool\",\n    \"17-0\": \"verification_level\",\n    \"17-1\": \"The level of verification the server has activated.\",\n    \"17-2\": \"int\",\n    \"18-0\": \"member_count\",\n    \"18-1\": \"How many members the guild has.\",\n    \"18-2\": \"int\",\n    \"6-0\": \"owner\",\n    \"6-1\": \"The owner of the guild.\",\n    \"6-2\": \"User\",\n    \"3-0\": \"icon_hash\",\n    \"3-1\": \"The hash of the guild icon.\",\n    \"3-2\": \"string\",\n    \"14-0\": \"splash_hash\",\n    \"14-1\": \"The hash of the guild splash screen (VIP only).\",\n    \"14-2\": \"string\",\n    \"9-0\": \"afk_timeout\",\n    \"9-1\": \"How long you will remain in a voice channel before you time out.\",\n    \"9-2\": \"int\"\n  },\n  \"cols\": 3,\n  \"rows\": 19\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Repositories\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Part\",\n    \"0-0\": \"`members`\",\n    \"0-1\": \"The members of the guild.\",\n    \"0-2\": \"[Member](doc:member)\",\n    \"1-0\": \"`roles`\",\n    \"1-1\": \"The roles of the guild.\",\n    \"1-2\": \"[Role](doc:role)\",\n    \"2-0\": \"`channels`\",\n    \"2-1\": \"The channels of the guild.\",\n    \"2-2\": \"[Channel](doc:channel)\",\n    \"3-0\": \"`bans`\",\n    \"3-1\": \"The user bans of the guild.\",\n    \"3-2\": \"[Ban](doc:ban)\",\n    \"4-0\": \"`invites`\",\n    \"4-1\": \"The instant invites of the guild.\",\n    \"4-2\": \"[Invite](doc:invite)\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"fn\",\n  \"title\": \"createRole(array $data = [])\"\n}\n[/block]\nCreates a role in the guild.\n\nReturns a Promise with a Role.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"`$data`\",\n    \"0-1\": \"An array of data to update the role with after creation.\",\n    \"0-2\": \"array\",\n    \"h-3\": \"Default\",\n    \"0-3\": \"`[]`\"\n  },\n  \"cols\": 4,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"fn\",\n  \"title\": \"transferOwnership(Member $member)\"\n}\n[/block]\nTransfers the ownership of a guild to another member. Only works if you are the owner of the guild.\n\nReturns a Promise.\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\": \"`$member`\",\n    \"0-1\": \"The member to transfer the ownership to.\",\n    \"0-2\": \"Member or snowflake ID\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]","excerpt":"The guild object is represented as a server in the Discord UI.","slug":"guild","type":"basic","title":"Guild"}

Guild

The guild object is represented as a server in the Discord UI.

The guild object is often referred to as a `server`. It holds roles, members, channels, bans, invites etc. [block:api-header] { "type": "basic", "title": "Attributes" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Type", "0-0": "id", "0-1": "The unique identifier of the Guild.", "0-2": "snowflake", "1-0": "name", "1-1": "The name of the guild.", "1-2": "string", "2-0": "icon", "2-1": "The URL to the guild icon.", "2-2": "string", "4-0": "region", "4-1": "The region the guild voice servers are hosted in.", "4-2": "string", "5-0": "owner_id", "5-1": "The unique identifier of the owner of the guild.", "5-2": "snowflake", "7-0": "joined_at", "7-1": "A timestamp of when the bot joined the guild.", "7-2": "Carbon", "8-0": "afk_channel_id", "8-1": "The unique identifier of the AFK voice channel.", "8-2": "snowflake", "10-0": "embed_enabled", "10-1": "Whether the embed is enabled.", "10-2": "bool", "11-0": "embed_channel_id", "11-1": "The unique identifier of the embedded channel.", "11-2": "bool", "12-0": "features", "12-1": "An array of features the guild has.", "12-2": "array[object]", "13-0": "splash", "13-1": "The URL to the guild splash screen (VIP only).", "13-2": "string", "15-0": "emojis", "15-1": "An array of emojis the guild has access to.", "15-2": "array[object]", "16-0": "large", "16-1": "Whether the guild is considered large (over 250 members).", "16-2": "bool", "17-0": "verification_level", "17-1": "The level of verification the server has activated.", "17-2": "int", "18-0": "member_count", "18-1": "How many members the guild has.", "18-2": "int", "6-0": "owner", "6-1": "The owner of the guild.", "6-2": "User", "3-0": "icon_hash", "3-1": "The hash of the guild icon.", "3-2": "string", "14-0": "splash_hash", "14-1": "The hash of the guild splash screen (VIP only).", "14-2": "string", "9-0": "afk_timeout", "9-1": "How long you will remain in a voice channel before you time out.", "9-2": "int" }, "cols": 3, "rows": 19 } [/block] [block:api-header] { "type": "basic", "title": "Repositories" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Part", "0-0": "`members`", "0-1": "The members of the guild.", "0-2": "[Member](doc:member)", "1-0": "`roles`", "1-1": "The roles of the guild.", "1-2": "[Role](doc:role)", "2-0": "`channels`", "2-1": "The channels of the guild.", "2-2": "[Channel](doc:channel)", "3-0": "`bans`", "3-1": "The user bans of the guild.", "3-2": "[Ban](doc:ban)", "4-0": "`invites`", "4-1": "The instant invites of the guild.", "4-2": "[Invite](doc:invite)" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "fn", "title": "createRole(array $data = [])" } [/block] Creates a role in the guild. Returns a Promise with a Role. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "0-0": "`$data`", "0-1": "An array of data to update the role with after creation.", "0-2": "array", "h-3": "Default", "0-3": "`[]`" }, "cols": 4, "rows": 1 } [/block] [block:api-header] { "type": "fn", "title": "transferOwnership(Member $member)" } [/block] Transfers the ownership of a guild to another member. Only works if you are the owner of the guild. Returns a Promise. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Default", "0-0": "`$member`", "0-1": "The member to transfer the ownership to.", "0-2": "Member or snowflake ID" }, "cols": 3, "rows": 1 } [/block]