{"_id":"575b6f2b57b1c00e00557028","__v":0,"user":"571193c63590a50e00bba99d","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"},"project":"571193ce8103870e00f48b67","category":{"_id":"57590727ace5c30e00cb23d8","__v":0,"version":"57590727ace5c30e00cb23d7","project":"571193ce8103870e00f48b67","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-16T01:22:22.642Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-11T01:53:47.102Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"You can pass through options to the Discord client constructor.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\n$discord = new \\\\Discord\\\\Discord([\\n\\t\\t'token' => 'your-auth-token',\\n  \\t// Extra options here...\\n]);\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Required\",\n    \"h-3\": \"Default\",\n    \"0-0\": \"token\",\n    \"0-1\": \"The Discord authentication token.\",\n    \"0-2\": \"true\",\n    \"0-3\": \"-\",\n    \"1-0\": \"shardID\",\n    \"1-1\": \"The ID of the shard (if you are using sharding).\",\n    \"1-2\": \"false\",\n    \"1-3\": \"-\",\n    \"2-0\": \"shardCount\",\n    \"2-1\": \"How many shards you are using (if you are using sharding).\",\n    \"2-2\": \"false\",\n    \"2-3\": \"-\",\n    \"3-0\": \"loop\",\n    \"3-1\": \"The ReactPHP event loop.\",\n    \"3-2\": \"false\",\n    \"3-3\": \"Event Loop\",\n    \"4-0\": \"logger\",\n    \"4-1\": \"The Monolog logger to use.\",\n    \"4-2\": \"false\",\n    \"4-3\": \"Monolog Logger\",\n    \"5-0\": \"loggerLevel\",\n    \"5-1\": \"The logger level to use.\",\n    \"5-2\": \"false\",\n    \"5-3\": \"`INFO`\",\n    \"6-0\": \"logging\",\n    \"6-1\": \"Whether logging is enabled.\",\n    \"6-2\": \"false\",\n    \"6-3\": \"`true`\",\n    \"7-0\": \"cachePool\",\n    \"7-1\": \"The cache pool to use.\",\n    \"7-2\": \"false\",\n    \"7-3\": \"`ArrayCachePool`\",\n    \"8-0\": \"loadAllMembers\",\n    \"8-1\": \"Whether all members should be preloaded.\",\n    \"8-2\": \"false\",\n    \"8-3\": \"`false`\",\n    \"9-0\": \"disabledEvents\",\n    \"9-1\": \"An array of events that will be ignored.\",\n    \"9-2\": \"false\",\n    \"9-3\": \"`[]`\",\n    \"10-0\": \"pmChannels\",\n    \"10-1\": \"Whether private message channels should be parsed and stored.\",\n    \"10-2\": \"false\",\n    \"10-3\": \"`false`\",\n    \"11-0\": \"storeMessages\",\n    \"11-1\": \"Whether messages received should be stored.\",\n    \"11-2\": \"false\",\n    \"11-3\": \"`false`\"\n  },\n  \"cols\": 4,\n  \"rows\": 12\n}\n[/block]","excerpt":"The Discord class constructor takes an array of options.","slug":"options","type":"basic","title":"Options"}

Options

The Discord class constructor takes an array of options.

You can pass through options to the Discord client constructor. [block:code] { "codes": [ { "code": "<?php\n\n$discord = new \\Discord\\Discord([\n\t\t'token' => 'your-auth-token',\n \t// Extra options here...\n]);", "language": "php" } ] } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "h-2": "Required", "h-3": "Default", "0-0": "token", "0-1": "The Discord authentication token.", "0-2": "true", "0-3": "-", "1-0": "shardID", "1-1": "The ID of the shard (if you are using sharding).", "1-2": "false", "1-3": "-", "2-0": "shardCount", "2-1": "How many shards you are using (if you are using sharding).", "2-2": "false", "2-3": "-", "3-0": "loop", "3-1": "The ReactPHP event loop.", "3-2": "false", "3-3": "Event Loop", "4-0": "logger", "4-1": "The Monolog logger to use.", "4-2": "false", "4-3": "Monolog Logger", "5-0": "loggerLevel", "5-1": "The logger level to use.", "5-2": "false", "5-3": "`INFO`", "6-0": "logging", "6-1": "Whether logging is enabled.", "6-2": "false", "6-3": "`true`", "7-0": "cachePool", "7-1": "The cache pool to use.", "7-2": "false", "7-3": "`ArrayCachePool`", "8-0": "loadAllMembers", "8-1": "Whether all members should be preloaded.", "8-2": "false", "8-3": "`false`", "9-0": "disabledEvents", "9-1": "An array of events that will be ignored.", "9-2": "false", "9-3": "`[]`", "10-0": "pmChannels", "10-1": "Whether private message channels should be parsed and stored.", "10-2": "false", "10-3": "`false`", "11-0": "storeMessages", "11-1": "Whether messages received should be stored.", "11-2": "false", "11-3": "`false`" }, "cols": 4, "rows": 12 } [/block]