Browse Source

RestcordPHP library, with modifyChannel edited to PATCH only

Mark Lightfoot 5 years ago
commit
8e441f5106
100 changed files with 3540 additions and 0 deletions
  1. 21 0
      LICENSE
  2. 21 0
      README.md
  3. 1 0
      VERSION
  4. 89 0
      bin/buildDocs
  5. 194 0
      bin/buildDummyClasses
  6. 241 0
      bin/buildModelClasses
  7. 44 0
      bin/downloadServiceDefinition
  8. 14 0
      bin/lint
  9. 25 0
      bin/setVersion
  10. 199 0
      bin/stupidFunctionalTest.php
  11. 47 0
      bin/update
  12. 39 0
      composer.json
  13. 3 0
      docs/.gitignore
  14. 7 0
      docs/404.md
  15. 1 0
      docs/CNAME
  16. 21 0
      docs/LICENSE
  17. 67 0
      docs/README.md
  18. 59 0
      docs/_config.yml
  19. 30 0
      docs/_docs/Audit-log/Get Guild Audit Log.md
  20. 28 0
      docs/_docs/Channel/Add Pinned Channel Message.md
  21. 27 0
      docs/_docs/Channel/Bulk Delete Messages (deprecated).md
  22. 34 0
      docs/_docs/Channel/Create Channel Invite.md
  23. 33 0
      docs/_docs/Channel/Create Message.md
  24. 29 0
      docs/_docs/Channel/Create Reaction.md
  25. 28 0
      docs/_docs/Channel/Delete All Reactions.md
  26. 28 0
      docs/_docs/Channel/Delete Channel Permission.md
  27. 28 0
      docs/_docs/Channel/Delete Message.md
  28. 29 0
      docs/_docs/Channel/Delete Own Reaction.md
  29. 28 0
      docs/_docs/Channel/Delete Pinned Channel Message.md
  30. 30 0
      docs/_docs/Channel/Delete User Reaction.md
  31. 30 0
      docs/_docs/Channel/Delete or Close Channel.md
  32. 31 0
      docs/_docs/Channel/Edit Channel Permissions.md
  33. 33 0
      docs/_docs/Channel/Edit Message.md
  34. 31 0
      docs/_docs/Channel/Get Channel Invites.md
  35. 28 0
      docs/_docs/Channel/Get Channel Message.md
  36. 31 0
      docs/_docs/Channel/Get Channel Messages.md
  37. 30 0
      docs/_docs/Channel/Get Channel.md
  38. 30 0
      docs/_docs/Channel/Get Pinned Messages.md
  39. 35 0
      docs/_docs/Channel/Get Reactions.md
  40. 30 0
      docs/_docs/Channel/Group DM Add Recipient.md
  41. 28 0
      docs/_docs/Channel/Group DM Remove Recipient.md
  42. 38 0
      docs/_docs/Channel/Modify Channel.md
  43. 27 0
      docs/_docs/Channel/Trigger Typing Indicator.md
  44. 33 0
      docs/_docs/Emoji/Create Guild Emoji.md
  45. 28 0
      docs/_docs/Emoji/Delete Guild Emoji.md
  46. 31 0
      docs/_docs/Emoji/Get Guild Emoji.md
  47. 30 0
      docs/_docs/Emoji/List Guild Emojis.md
  48. 33 0
      docs/_docs/Emoji/Modify Guild Emoji.md
  49. 24 0
      docs/_docs/Gateway/Get Gateway Bot.md
  50. 24 0
      docs/_docs/Gateway/Get Gateway.md
  51. 29 0
      docs/_docs/Guild/Add Guild Member Role.md
  52. 36 0
      docs/_docs/Guild/Add Guild Member.md
  53. 28 0
      docs/_docs/Guild/Begin Guild Prune.md
  54. 30 0
      docs/_docs/Guild/Create Guild Ban.md
  55. 37 0
      docs/_docs/Guild/Create Guild Channel.md
  56. 29 0
      docs/_docs/Guild/Create Guild Integration.md
  57. 35 0
      docs/_docs/Guild/Create Guild Role.md
  58. 37 0
      docs/_docs/Guild/Create Guild.md
  59. 28 0
      docs/_docs/Guild/Delete Guild Integration.md
  60. 28 0
      docs/_docs/Guild/Delete Guild Role.md
  61. 27 0
      docs/_docs/Guild/Delete Guild.md
  62. 30 0
      docs/_docs/Guild/Get Guild Bans.md
  63. 30 0
      docs/_docs/Guild/Get Guild Channels.md
  64. 30 0
      docs/_docs/Guild/Get Guild Embed.md
  65. 30 0
      docs/_docs/Guild/Get Guild Integrations.md
  66. 31 0
      docs/_docs/Guild/Get Guild Invites.md
  67. 31 0
      docs/_docs/Guild/Get Guild Member.md
  68. 28 0
      docs/_docs/Guild/Get Guild Prune Count.md
  69. 30 0
      docs/_docs/Guild/Get Guild Roles.md
  70. 30 0
      docs/_docs/Guild/Get Guild Vanity URL.md
  71. 30 0
      docs/_docs/Guild/Get Guild Voice Regions.md
  72. 30 0
      docs/_docs/Guild/Get Guild.md
  73. 32 0
      docs/_docs/Guild/List Guild Members.md
  74. 28 0
      docs/_docs/Guild/Modify Current User Nick.md
  75. 29 0
      docs/_docs/Guild/Modify Guild Channel Positions.md
  76. 30 0
      docs/_docs/Guild/Modify Guild Embed.md
  77. 31 0
      docs/_docs/Guild/Modify Guild Integration.md
  78. 33 0
      docs/_docs/Guild/Modify Guild Member.md
  79. 32 0
      docs/_docs/Guild/Modify Guild Role Positions.md
  80. 36 0
      docs/_docs/Guild/Modify Guild Role.md
  81. 41 0
      docs/_docs/Guild/Modify Guild.md
  82. 28 0
      docs/_docs/Guild/Remove Guild Ban.md
  83. 29 0
      docs/_docs/Guild/Remove Guild Member Role.md
  84. 28 0
      docs/_docs/Guild/Remove Guild Member.md
  85. 28 0
      docs/_docs/Guild/Sync Guild Integration.md
  86. 28 0
      docs/_docs/Guild/Update Current Users' Nickname.md
  87. 27 0
      docs/_docs/Invite/Accept Invite.md
  88. 30 0
      docs/_docs/Invite/Delete Invite.md
  89. 30 0
      docs/_docs/Invite/Get Invite.md
  90. 34 0
      docs/_docs/Oauth2/Get Current Application Information.md
  91. 30 0
      docs/_docs/User/Create DM.md
  92. 31 0
      docs/_docs/User/Create Group DM.md
  93. 32 0
      docs/_docs/User/Get Current User Guilds.md
  94. 27 0
      docs/_docs/User/Get Current User.md
  95. 27 0
      docs/_docs/User/Get User Connections.md
  96. 27 0
      docs/_docs/User/Get User DMs.md
  97. 30 0
      docs/_docs/User/Get User.md
  98. 27 0
      docs/_docs/User/Leave Guild.md
  99. 31 0
      docs/_docs/User/Modify Current User.md
  100. 0 0
      docs/_docs/Voice/List Voice Regions.md

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 restcord
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 21 - 0
README.md

@@ -0,0 +1,21 @@
+RestCord - PHP Edition
+======================
+
+[![GitHub release](https://img.shields.io/github/release/restcord/restcord.svg)](https://www.github.com/restcord/restcord) [![Build Status](https://travis-ci.org/restcord/restcord.svg?branch=master)](https://travis-ci.org/restcord/restcord) [![Discord Chat](https://img.shields.io/badge/chat-Discord%20API-blue.svg)](https://discord.gg/khC2PP8) [![StyleCI](https://styleci.io/repos/79310512/shield?branch=master)](https://styleci.io/repos/79310512)
+
+What is this?
+------------
+
+This is a PHP library for the Discord API. This library is limited to the basic REST api that Discord provides.
+If you are doing anything heavy, or fancy, you should probably look at [the other php library][1].
+
+## [Documentation](https://www.restcord.com/)
+
+Documentation can be found [here](https://www.restcord.com/).
+
+### Wrappers
+
+* [Laravel](https://github.com/more-cores/laravel-restcord)
+
+
+[1]: https://github.com/teamreflex/DiscordPHP

+ 1 - 0
VERSION

@@ -0,0 +1 @@
+0.1.1

+ 89 - 0
bin/buildDocs

@@ -0,0 +1,89 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+require __DIR__.'/../vendor/autoload.php';
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+$loader = new Twig_Loader_Filesystem(__DIR__.'/../src/Resources/');
+$twig   = new Twig_Environment($loader, ['debug' => true]);
+$twig->addExtension(new Twig_Extension_Debug());
+
+function recursiveRemoveDirectory($directory)
+{
+    foreach (glob("{$directory}/*") as $file) {
+        if (is_dir($file)) {
+            recursiveRemoveDirectory($file);
+        } else {
+            unlink($file);
+        }
+    }
+    rmdir($directory);
+}
+
+/** @noinspection PhpUnhandledExceptionInspection */
+(new Application('Build Docs', '1.0.0'))
+    ->register('buildDocs')
+    ->addArgument('version', InputArgument::REQUIRED, 'Version to build')
+    ->setCode(
+        function (InputInterface $input, OutputInterface $output) use ($twig) {
+            $style = new \Symfony\Component\Console\Style\SymfonyStyle($input, $output);
+            $style->title("Building Docs for: ".$input->getArgument('version'));
+
+            $path = __DIR__.'/../docs/_docs';
+            recursiveRemoveDirectory($path);
+            mkdir($path, 02775, true);
+            $path = realpath($path);
+
+            $definition = \GuzzleHttp\json_decode(
+                file_get_contents(
+                    __DIR__.'/../src/Resources/service_description-v'.$input->getArgument('version').'.json'
+                ),
+                true
+            );
+
+            foreach ($definition['operations'] as $category => $operations) {
+                $i = 1;
+                foreach ($operations as $operation => $config) {
+                    $filePath = $path.'/'.ucwords($category).'/';
+                    if (!file_exists($filePath)) {
+                        mkdir($filePath, 02775, true);
+                    }
+
+                    try {
+                        $markdown = $twig->render(
+                            'operation.md.twig',
+                            [
+                                'category'  => $category,
+                                'operation' => $operation,
+                                'config'    => $config,
+                                'order'     => $i
+                            ]
+                        );
+                    } catch (\Exception $e) {
+                        throw $e;
+                    }
+
+                    file_put_contents($filePath.str_replace('/', ' or ', $config['name']).'.md', $markdown);
+                    $i++;
+                }
+            }
+
+            $style->success('Finished. Docs built in: '.realpath($path));
+        }
+    )
+    ->getApplication()
+    ->setDefaultCommand('buildDocs', true)
+    ->run();

+ 194 - 0
bin/buildDummyClasses

@@ -0,0 +1,194 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+function recursiveRemoveDirectory($directory)
+{
+    foreach (glob("{$directory}/*") as $file) {
+        if (is_dir($file)) {
+            recursiveRemoveDirectory($file);
+        } else {
+            unlink($file);
+        }
+    }
+    rmdir($directory);
+}
+
+$path = __DIR__.'/../src/Interfaces';
+try {
+    recursiveRemoveDirectory($path);
+} catch (\Exception $e) {
+}
+mkdir($path, 02775, true);
+$path = realpath($path);
+
+require __DIR__.'/../vendor/autoload.php';
+
+use gossi\codegen\generator\CodeGenerator;
+use gossi\codegen\model\PhpInterface;
+use gossi\codegen\model\PhpMethod;
+use gossi\codegen\model\PhpParameter;
+use gossi\codegen\model\PhpProperty;
+use GuzzleHttp\Command\Result;
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+$loader = new Twig_Loader_Filesystem(__DIR__.'/../src/Resources/');
+$twig   = new Twig_Environment($loader, ['debug' => true]);
+$twig->addExtension(new Twig_Extension_Debug());
+
+$license = <<<EOF
+<?php
+
+/*
+ * Copyright 2017 Aaron Scherer
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ *
+ * @package     restcord/restcord
+ * @copyright   Aaron Scherer 2017
+ * @license     MIT
+ */
+\n
+EOF;
+
+/** @noinspection PhpUnhandledExceptionInspection */
+(new Application('Build Dummy Classes', '1.0.0'))
+    ->register('buildDummyClasses')
+    ->addArgument('version', InputArgument::REQUIRED, 'Version to build')
+    ->setCode(
+        function (InputInterface $input, OutputInterface $output) use ($twig, $license, $path) {
+            $style = new \Symfony\Component\Console\Style\SymfonyStyle($input, $output);
+            $style->title("Building Dummy Classes for Gateway v".$input->getArgument('version'));
+
+            $definition = \GuzzleHttp\json_decode(
+                file_get_contents(
+                    __DIR__.'/../src/Resources/service_description-v'.$input->getArgument('version').'.json'
+                ),
+                true
+            );
+
+            $generator = new CodeGenerator();
+            foreach ($definition['operations'] as $resource => $operations) {
+                $resource = str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $resource)));
+
+                $class = new PhpInterface();
+                $class->setQualifiedName('RestCord\\Interfaces\\'.ucwords($resource));
+                $class->setDescription(ucwords($resource)." Intellisense Helper");
+                $class->setMethods(
+                    array_map(
+                        function ($name, $operation) use ($class, $resource) {
+                            $options = new PhpParameter('options');
+                            $options->setType(
+                                'array',
+                                '['.implode(
+                                    ', ',
+                                    array_map(
+                                        function ($name, $parameter) {
+                                            return "'".$name."' => '".$parameter['type']."'";
+                                        },
+                                        array_keys($operation['parameters']),
+                                        $operation['parameters']
+                                    )
+                                ).']'
+                            );
+
+                            $returnType = 'array';
+                            if (isset($operation['responseTypes']) && sizeof($operation['responseTypes']) >= 1) {
+                                $firstType = $operation['responseTypes'][0]['type'];
+                                $array     = stripos($firstType, 'Array<') !== false;
+                                if ($array) {
+                                    $firstType = substr($firstType, 6, -1);
+                                }
+
+                                $temp = explode("/", $firstType);
+                                $returnType = sprintf(
+                                    "\\RestCord\\Model\\%s\\%s",
+                                    str_replace(
+                                        ' ',
+                                        '',
+                                        ucwords(str_replace('-', ' ', $temp[0]))
+                                    ),
+                                    str_replace(
+                                        ' ',
+                                        '',
+                                        ucwords(str_replace('-', ' ', $temp[1]))
+                                    )
+                                );
+
+                                $returnType = mapBadDocs($name, $operation, $returnType);
+
+                                if (!class_exists($returnType)) {
+                                    $returnType = "\\".Result::class;
+                                }
+
+                                $returnType .= $array ? '[]' : '';
+                            }
+
+                            $method = new PhpMethod(
+                                lcfirst(str_replace(' ', '', ucwords(str_replace('-', ' ', $name))))
+                            );
+                            $method->setType($returnType, $operation['responseNote'] ?? '');
+                            if (isset($operation['link'])) {
+                                $method->setLongDescription('@see '.$operation['link']);
+                            }
+                            $method->setParameters([$options]);
+                            $method->setVisibility('public');
+
+                            return $method;
+                        },
+                        array_keys($operations),
+                        $operations
+                    )
+                );
+
+                file_put_contents($path.'/'.ucwords($resource).'.php', $license.$generator->generate($class));
+            }
+
+            $style->success('Finished. Classes built in: '.realpath($path));
+        }
+    )
+    ->getApplication()
+    ->setDefaultCommand('buildDummyClasses', true)
+    ->run();
+
+function mapBadDocs(string $name, array $operation, string $cls): string
+{
+    switch ($cls) {
+        case '\RestCord\Model\User\DmChannel':
+            $newCls = '\RestCord\Model\Channel\DmChannel';
+            break;
+        case '\RestCord\Model\Channel\Invite':
+        case '\RestCord\Model\Guild\Invite':
+            $newCls = '\RestCord\Model\Invite\Invite';
+            break;
+        case '\RestCord\Model\Guild\GuildChannel':
+            $newCls = '\RestCord\Model\Channel\GuildChannel';
+            break;
+        case '\RestCord\Model\Guild\User':
+        case '\RestCord\Model\Channel\User':
+            $newCls = '\RestCord\Model\User\User';
+            break;
+        case 'ISO8601':
+        case '\RestCord\Model\Channel\ISO8601':
+            $newCls = '\DateTimeImmutable';
+            break;
+        default:
+            return $cls;
+    }
+
+    trigger_error($name.' operation in '.$operation['resource'].' has a bad responseType: '.$cls);
+
+    return $newCls;
+}

+ 241 - 0
bin/buildModelClasses

@@ -0,0 +1,241 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+function recursiveRemoveDirectory($directory)
+{
+    foreach (glob("{$directory}/*") as $file) {
+        if (is_dir($file)) {
+            recursiveRemoveDirectory($file);
+        } else {
+            unlink($file);
+        }
+    }
+    rmdir($directory);
+}
+
+$path = __DIR__.'/../src/Model';
+try {
+    recursiveRemoveDirectory($path);
+} catch (\Exception $e) {
+}
+mkdir($path, 02775, true);
+$path = realpath($path);
+
+require __DIR__.'/../vendor/autoload.php';
+
+use gossi\codegen\generator\CodeGenerator;
+use gossi\codegen\model\PhpClass;
+use gossi\codegen\model\PhpMethod;
+use gossi\codegen\model\PhpProperty;
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+$loader = new Twig_Loader_Filesystem(__DIR__.'/../src/Resources/');
+$twig   = new Twig_Environment($loader, ['debug' => true]);
+$twig->addExtension(new Twig_Extension_Debug());
+
+$license = <<<EOF
+<?php
+
+/*
+ * Copyright 2017 Aaron Scherer
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ *
+ * @package     restcord/restcord
+ * @copyright   Aaron Scherer 2017
+ * @license     MIT
+ */
+\n
+EOF;
+
+/** @noinspection PhpUnhandledExceptionInspection */
+(new Application('Build Model Classes', '1.0.0'))
+    ->register('buildModelClasses')
+    ->addArgument('version', InputArgument::REQUIRED, 'Version to build')
+    ->setCode(
+        function (InputInterface $input, OutputInterface $output) use ($twig, $license, $path) {
+            $style = new \Symfony\Component\Console\Style\SymfonyStyle($input, $output);
+            $style->title("Building Model Classes for: ".$input->getArgument('version'));
+
+            $definition = \GuzzleHttp\json_decode(
+                file_get_contents(
+                    __DIR__.'/../src/Resources/service_description-v'.$input->getArgument('version').'.json'
+                ),
+                true
+            );
+
+            $generator = new CodeGenerator();
+            foreach ($definition['models'] as $resource => $models) {
+                foreach ($models as $name => $model) {
+                    $resource = str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $resource)));
+                    $name     = str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $name)));
+                    $class    = new PhpClass();
+                    $class->setQualifiedName('RestCord\\Model\\'.ucwords($resource).'\\'.ucwords($name));
+                    $class->setDescription(ucwords($name)." Model");
+                    $class->setProperties(
+                        array_map(
+                            function (&$name, $property) use ($class, $resource, $model) {
+                                $optional = strpos($name, '?') !== false;
+                                $name     = lcfirst(str_replace([' ', '?'], '', str_replace('-', '_', $name)));
+                                $prop     = new PhpProperty($name);
+
+                                $prop->setType(normalizeType($name, $resource, $property).($optional ? "|null" : ""));
+                                $prop->setDescription($property['description']);
+
+                                if (isset($property['default'])) {
+                                    $prop->setValue($property['default']);
+                                }
+
+                                return $prop;
+                            },
+                            array_keys($model['properties']),
+                            $model['properties']
+                        )
+                    );
+
+                    addTraits($class, $resource, $name);
+
+                    $constructor = new PhpMethod('__construct');
+                    $constructor->addSimpleParameter('content', 'array', null);
+                    $constructor->setBody(
+                        <<<EOF
+                        if (null === \$content) {
+    return;
+}
+                    
+foreach (\$content as \$key => \$value) {
+    \$key = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', \$key))));
+    if (property_exists(\$this, \$key)) {
+        \$this->{\$key} = \$value;
+    }
+}
+EOF
+                    );
+                    $constructor->setVisibility('public');
+                    $class->setMethod($constructor);
+
+                    @mkdir($path.'/'.ucwords($resource), 02775, true);
+                    file_put_contents(
+                        $path.'/'.ucwords($resource).'/'.ucwords($name).'.php',
+                        $license.$generator->generate($class)
+                    );
+                }
+            }
+
+            $style->success('Finished. Classes built in: '.realpath($path));
+        }
+    )
+    ->getApplication()
+    ->setDefaultCommand('buildModelClasses', true)
+    ->run();
+
+function normalizeType(string $name, string $resource, array $property): string
+{
+    $type = $property['type'];
+    if ($name === 'user' && $resource === 'Guild') {
+        $type = "user/user";
+    }
+
+    switch ($type) {
+        default:
+            if (strpos($type, '/') !== false || strpos($type, 'Array<') === 0) {
+                $array = false;
+                if (stripos($type, 'Array') !== false) {
+                    $array = true;
+                    $type  = str_replace(['Array<', '>'], '', $type);
+                }
+
+                if ($type === 'snowflake') {
+                    return 'int[]';
+                }
+
+                $cls   = "\\RestCord\\Model\\";
+                $tmp   = explode('/', $type);
+                $cls   .= ucwords($tmp[0])."\\";
+                $clean = str_replace(['-object', '-'], ['', ' '], $tmp[1]);
+                $clean = ucwords($clean);
+                $clean = str_replace(' ', '', $clean);
+
+                $fullClass = $cls.$clean.($array ? '[]' : '');
+                $fullClass = mapBadDocs($fullClass);
+
+                return $fullClass;
+            }
+
+            return $type;
+        case 'array':
+            if (strpos($property['description'], "ids") !== false) {
+                return "int[]";
+            }
+
+            return "array";
+        case 'ISO8601 timestamp':
+        case 'ISO8601':
+            return '\DateTimeImmutable';
+        case 'datetime':
+            return '\DateTime';
+        case 'snowflake':
+        case 'integer':
+        case 'timestamp':
+            return 'int';
+        case 'object':
+            return 'array';
+        case 'boolean':
+            return 'bool';
+    }
+}
+
+function isTransformType(string $type): bool
+{
+    $nonTransform = ['string', 'array'];
+
+    return array_search($type, $nonTransform) === false;
+}
+
+function mapBadDocs(string $cls): string
+{
+    switch ($cls) {
+        case '\RestCord\Model\User\DmChannel':
+            return '\RestCord\Model\Channel\DmChannel';
+        case '\RestCord\Model\Channel\Invite':
+        case '\RestCord\Model\Guild\Invite':
+            return '\RestCord\Model\Invite\Invite';
+        case '\RestCord\Model\Guild\GuildChannel':
+            return '\RestCord\Model\Channel\GuildChannel';
+        case '\RestCord\Model\Guild\User':
+        case '\RestCord\Model\Channel\User':
+            return '\RestCord\Model\User\User';
+        case 'ISO8601':
+        case '\RestCord\Model\Channel\ISO8601':
+            return '\DateTimeImmutable';
+        default:
+            return $cls;
+    }
+
+    return $cls;
+}
+
+function addTraits(PhpClass $class, string $resource, string $name)
+{
+    if ($resource === 'User' && $name === 'User') {
+        $class->addUseStatement(\RestCord\Traits\AvatarTrait::class)->addTrait("AvatarTrait");
+    }
+
+    if ($resource === 'Guild' && $name === 'Guild') {
+        $class->addUseStatement(\RestCord\Traits\IconTrait::class)->addTrait("IconTrait");
+        $class->addUseStatement(\RestCord\Traits\SplashTrait::class)->addTrait("SplashTrait");
+    }
+}

+ 44 - 0
bin/downloadServiceDefinition

@@ -0,0 +1,44 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+require __DIR__.'/../vendor/autoload.php';
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+(new Application('Download Service Definitions', '1.0.0'))
+    ->register('downloadServiceDefinition')
+    ->addArgument('version', InputArgument::REQUIRED, 'Version to download')
+    ->setCode(
+        function (InputInterface $input, OutputInterface $output) {
+            $style = new \Symfony\Component\Console\Style\SymfonyStyle($input, $output);
+            $style->title("Downloading Service Definition for: ".$input->getArgument('version'));
+
+            $file = __DIR__.'/../src/Resources/service_description-v'.$input->getArgument('version').'.json';
+            file_put_contents(
+                $file,
+                \GuzzleHttp\json_encode(
+                    \GuzzleHttp\json_decode(
+                        file_get_contents('https://discord-service-definition.herokuapp.com/')
+                    ),
+                    JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
+                )
+            );
+
+            $style->success('Finished. Downloaded to: '.$file);
+        }
+    )
+    ->getApplication()
+    ->setDefaultCommand('downloadServiceDefinition', true)
+    ->run();

+ 14 - 0
bin/lint

@@ -0,0 +1,14 @@
+#!/bin/bash
+
+echo "Finding all php files"
+
+# iterate
+while test ${#} -gt 0
+do
+    echo ""
+    echo "<<< In '$1' >>>"
+    find -L $1 -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
+    echo "=================="
+
+    shift
+done

+ 25 - 0
bin/setVersion

@@ -0,0 +1,25 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+require __DIR__.'/../vendor/autoload.php';
+
+// https://gist.github.com/stevegrunwell/3363975
+function get_current_git_commit($branch = 'master')
+{
+    if ($hash = file_get_contents(sprintf('.git/refs/heads/%s', $branch))) {
+        return $hash;
+    } else {
+        return false;
+    }
+}
+
+file_put_contents(__DIR__ .'/../VERSION', get_current_git_commit());

+ 199 - 0
bin/stupidFunctionalTest.php

@@ -0,0 +1,199 @@
+<?php
+
+/*
+ * Copyright 2017 Aaron Scherer
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ *
+ * @package     restcord/restcord
+ * @copyright   Aaron Scherer 2017
+ * @license     MIT
+ */
+
+require __DIR__.'/../vendor/autoload.php';
+
+set_error_handler(
+    function ($severity, $message, $file, $line) {
+        if (error_reporting() & $severity) {
+            throw new ErrorException($message, 0, $severity, $file, $line);
+        }
+    }
+);
+
+use Assert\Assertion;
+use RestCord\DiscordClient;
+use RestCord\RateLimit\Provider\RedisRateLimitProvider;
+use Symfony\Component\Console\Input\ArgvInput;
+use Symfony\Component\Console\Output\ConsoleOutput;
+use Symfony\Component\Console\Style\SymfonyStyle;
+
+$output = new SymfonyStyle(new ArgvInput(), new ConsoleOutput());
+
+$output->title('Stupid Functional Test');
+
+$output->text('-> Creating Client');
+$client = new DiscordClient(
+    [
+        'token'             => $argv[1],
+        'rateLimitProvider' => new RedisRateLimitProvider(),
+        'throwOnRatelimit'  => true,
+        'cacheDir'          => __DIR__.'/../cache',
+        'logger'            => new \Psr\Log\NullLogger(),
+    ]
+);
+
+$msg = $client->channel->createMessage(
+    [
+        'channel.id' => 146037311753289737,
+        'content'    => 'Something real',
+    ]
+);
+
+$client->channel->editMessage(
+    [
+        'channel.id' => 146037311753289737,
+        'message.id' => intval($msg['id']),
+        'content'    => 'Something edited',
+    ]
+);
+
+$output->text('-> Modifying Guild Channel Permissions');
+$client->guild->modifyGuildChannelPositions(
+    [['guild.id' => 146037311753289737, 'id' => 146037311753289737, 'position' => 10]]
+);
+$client->guild->modifyGuildChannelPositions(
+    [['guild.id' => 146037311753289737, 'id' => 146037311753289737, 'position' => 0]]
+);
+
+$output->text('-> Creating channel invite');
+$invite = $client->channel->createChannelInvite(
+    [
+        'channel.id' => (int) $argv[2],
+        'max_age'    => 5,
+        'max_uses'   => 1,
+        'unique'     => true,
+        'temporary'  => false,
+    ]
+);
+
+$output->text('-> Fetching Guild');
+$guild = $client->guild->getGuild(['guild.id' => (int) $argv[2]]);
+Assertion::eq(108432868149035008, $guild->owner_id);
+
+$output->text('-> Fetching User');
+$user = $client->user->getUser(['user.id' => (int) $guild->owner_id]);
+Assertion::eq(0001, $user->discriminator);
+
+$output->text('-> Updating Member');
+$client->guild->updateNick(
+    [
+        'guild.id' => (int) $argv[2],
+        'nick'     => 'Build at: '.time(),
+    ]
+);
+
+$output->text('-> Listing Members');
+$users = $client->guild->listGuildMembers(['guild.id' => 146037311753289737, 'limit' => 25]);
+Assertion::eq(108432868149035008, $users[0]->user->id);
+
+$output->text('-> Creating Guild Role');
+$role = $client->guild->createGuildRole(['guild.id' => 146037311753289737, 'name' => 'Test Role']);
+Assertion::eq('Test Role', $role->name);
+
+$output->text('-> Updating Guild Role Permissions');
+$roles = $client->guild->modifyGuildRolePositions(
+    [['guild.id' => 146037311753289737, 'id' => $role->id, 'position' => 5]]
+);
+foreach ($roles as $r) {
+    if ((int) $r->id === $role->id) {
+        Assertion::eq(5, $r->position);
+    }
+}
+
+$output->text('-> Deleting Guild Role');
+$response = $client->guild->deleteGuildRole(['guild.id' => 146037311753289737, 'role.id' => $role->id]);
+
+$output->text('-> Getting Guild Channels');
+$channels = $client->guild->getGuildChannels(['guild.id' => 146037311753289737]);
+Assertion::eq(count($channels), 14);
+
+$output->text('-> Executing Webhook');
+/** @var \GuzzleHttp\Command\Result $response */
+$response = $client->webhook->executeWebhook(
+    [
+        'webhook.id'    => 282261441090813952,
+        'webhook.token' => 'NQY9-DzLRT0Sst7Ri5bTsjD3F5cby69PYNXcmbzXYubPbY1KQSQxbGrLIjvMJXcdEBcp',
+        'username'      => 'RestCord',
+        'embeds'        => [
+            ['title' => 'RestCord test at: '.date('Y-m-d H:i:s')],
+        ],
+    ]
+);
+Assertion::eq($response->count(), 0);
+
+$output->text('-> Sending user a DM');
+$dm = $client->user->createDm(['recipient_id' => 108432868149035008]);
+$client->channel->createMessage(
+    [
+        'channel.id' => $dm->id,
+        'embed'      => [
+            'title' => 'RestCord test at: '.date(
+                    'Y-m-d H:i:s'
+                ),
+        ],
+    ]
+);
+$client->channel->createMessage(
+    [
+        'channel.id' => $channels[0]->id,
+        'content'    => 'this `supports` __a__ **subset** *of* ~~markdown~~ 😃 ```js
+ function foo(bar) {
+   console.log(bar);
+ }
+ 
+ foo(1);```',
+        'embed'      => [
+            'title'       => 'title ~~(did you know you can have markdown here too?)~~',
+            'description' => "this supports [named links](https://discordapp.com) on top of the previously shown subset of markdown. ```\nyes, even code blocks```",
+            'url'         => 'https://discordapp.com',
+            'color'       => 14290439,
+            'timestamp'   => '2017-02-20T18:05:58.512Z',
+            'footer'      => [
+                'icon_url' => 'https://cdn.discordapp.com/embed/avatars/0.png',
+                'text'     => 'footer text',
+            ],
+            'thumbnail'   => [
+                'url' => 'https://cdn.discordapp.com/embed/avatars/0.png',
+            ],
+            'image'       => [
+                'url' => 'https://cdn.discordapp.com/embed/avatars/0.png',
+            ],
+            'author'      => [
+                'name'     => 'author name',
+                'url'      => 'https://discordapp.com',
+                'icon_url' => 'https://cdn.discordapp.com/embed/avatars/0.png',
+            ],
+            'fields'      => [
+                [
+                    'name'  => 'Foo',
+                    'value' => 'some of these properties have certain limits...',
+                ],
+                [
+                    'name'  => 'Bar',
+                    'value' => 'try exceeding some of them!',
+                ],
+                [
+                    'name'  => ' 😃',
+                    'value' => 'an informative error should show up, and this view will remain as-is until all issues are fixed',
+                ],
+                [
+                    'name'  => '<:thonkang:219069250692841473>',
+                    'value' => '???',
+                ],
+            ],
+        ],
+    ]
+);
+
+$output->success('Success!');

+ 47 - 0
bin/update

@@ -0,0 +1,47 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of php-restcord.
+ *
+ * (c) Aaron Scherer <aequasi@gmail.com>
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE
+ */
+
+require __DIR__.'/../vendor/autoload.php';
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Process\Process;
+
+/** @noinspection PhpUnhandledExceptionInspection */
+(new Application('Updating', '1.0.0'))
+    ->register('update')
+    ->addArgument('version', InputArgument::REQUIRED, 'Version to build')
+    ->setCode(
+        function (InputInterface $input, OutputInterface $output) {
+            $style = new SymfonyStyle($input, $output);
+            $style->title("Building Docs for: ".$input->getArgument('version'));
+
+            run($output, "./bin/downloadServiceDefinition -vvv " . $input->getArgument('version'));
+            run($output, "./bin/buildDocs -vvv " . $input->getArgument('version'));
+            run($output, "./bin/buildModelClasses -vvv " . $input->getArgument('version'));
+            run($output, "./bin/buildDummyClasses -vvv " . $input->getArgument('version'));
+        }
+    )
+    ->getApplication()
+    ->setDefaultCommand('update', true)
+    ->run();
+
+
+function run(OutputInterface $output, $process) {
+    $process = new Process($process);
+    $process->run(function ($type, $buffer) use ($output) {
+        $output->write($buffer);
+    });
+}

+ 39 - 0
composer.json

@@ -0,0 +1,39 @@
+{
+    "name":         "restcord/restcord",
+    "description":  "REST Library for the Discord API",
+    "type":         "library",
+    "require":      {
+        "php":                        "^5.6|^7.0",
+        "guzzlehttp/guzzle":          "^6.3",
+        "guzzlehttp/guzzle-services": "^1.0",
+        "monolog/monolog":            "^1.22",
+        "netresearch/jsonmapper":     "^1.4",
+        "symfony/options-resolver":   "^2.6|^3.0|^4.0"
+    },
+    "autoload":     {
+        "psr-4": {
+            "RestCord\\": "src/"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "RestCord\\Test\\": "tests/"
+        }
+    },
+    "license":      "MIT",
+    "authors":      [
+        {
+            "name":  "Aaron Scherer",
+            "email": "aequasi@gmail.com"
+        }
+    ],
+    "require-dev":  {
+        "beberlei/assert":          "^2.7",
+        "gossi/php-code-generator": "^0.4.1",
+        "symfony/console":          "^2.6|^3.0|^4.0",
+        "symfony/process":          "^2.6|^3.0|^4.0",
+        "symfony/var-dumper":       "^2.6|^3.0|^4.0",
+        "twig/twig":                "^1.20|^2.0",
+        "phpunit/phpunit":          "^6.0|^5.0"
+    }
+}

+ 3 - 0
docs/.gitignore

@@ -0,0 +1,3 @@
+_site/
+.sass-cache/
+.jekyll-metadata

+ 7 - 0
docs/404.md

@@ -0,0 +1,7 @@
+---
+title: Not Found
+permalink: /404.html
+sitemap: false
+---
+
+This page doesn't exist!

+ 1 - 0
docs/CNAME

@@ -0,0 +1 @@
+www.restcord.com

+ 21 - 0
docs/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 CloudCannon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 67 - 0
docs/README.md

@@ -0,0 +1,67 @@
+# Edition
+
+Product documentation template for Jekyll. Browse through a [live demo](https://long-pig.cloudvent.net/).
+Start documenting your product, application, service or website with this configurable theme.
+
+![Edition template screenshot](images/_screenshot.png)
+
+Edition was made by [CloudCannon](http://cloudcannon.com/), the Cloud CMS for Jekyll.
+Find more templates and themes at [Jekyll Tips](http://jekyll.tips/templates/).
+
+Learn Jekyll with step-by-step tutorials and videos at [Jekyll Tips](http://jekyll.tips/).
+
+## Features
+
+* Two column layout
+* Full text search
+* Pre-styled components
+* Auto-generated navigation based on category
+* Optimised for editing in [CloudCannon](http://cloudcannon.com/)
+* Change log
+* RSS/Atom feed
+* SEO tags
+* Google Analytics
+
+## Setup
+
+1. Add your site and author details in `_config.yml`.
+2. Get a workflow going to see your site's output (with [CloudCannon](https://app.cloudcannon.com/) or Jekyll locally).
+
+## Develop
+
+Edition was built with [Jekyll](http://jekyllrb.com/) version 3.3.1, but should support newer versions as well.
+
+Install the dependencies with [Bundler](http://bundler.io/):
+
+~~~bash
+$ bundle install
+~~~
+
+Run `jekyll` commands through Bundler to ensure you're using the right versions:
+
+~~~bash
+$ bundle exec jekyll serve
+~~~
+
+## Editing
+
+Edition is already optimised for adding, updating and removing documentation pages in CloudCannon.
+
+### Documentation pages
+
+* Add, update or remove a documentation page in the *Documentation* collection.
+* Change the category of a documentation page to move it to another section in the navigation.
+* Documentation pages are organised in the navigation by category, with URLs based on the path inside the `_docs` folder.
+
+### Change log
+
+* Add, update or remove change log entries from your posts.
+* Tag entries as minor or major in the front matter.
+
+### Search
+
+* Add `excluded_in_search: true` to any documentation page's front matter to exclude that page in the search results.
+
+### Navigation
+
+* Change `site.show_full_navigation` to control all or only the current navigation group being open.

+ 59 - 0
docs/_config.yml

@@ -0,0 +1,59 @@
+# ----
+# Site
+
+title: RestCord
+url: "https://restcord.com"
+baseurl: ""
+google_analytics_key: UA-90584770-1
+show_full_navigation: false
+
+# Values for the jekyll-seo-tag gem (https://github.com/jekyll/jekyll-seo-tag)
+logo: /siteicon.png
+description: Documentation for RestCord
+author:
+  name: Aaron
+  email: aequasi@gmail.com
+  twitter: aequasi
+social:
+  name: RestCord
+  links:
+    - https://github.com/restcord/restcord
+
+# -----
+# Build
+
+permalink: pretty
+
+gems:
+  - jekyll-sitemap
+  - jekyll-seo-tag
+  - jekyll-feed
+
+exclude:
+  - Gemfile
+  - Gemfile.lock
+  - README.md
+  - LICENCE
+
+collections:
+  docs:
+    title: Documentation
+    permalink: /:path/
+    output: true
+
+defaults:
+  -
+    scope:
+      path: ""
+    values:
+      layout: default
+  -
+    scope:
+      path: ""
+      type: "docs"
+    values:
+      seo:
+        type: Article
+      _comments:
+        category: Group navigation links with this field
+        order: Used to sort links in the navigation

+ 30 - 0
docs/_docs/Audit-log/Get Guild Audit Log.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Audit Log
+category: Audit-Log
+order: 1
+---
+
+# `getGuildAuditLog`
+
+```php
+$client->audit-log->getGuildAuditLog($parameters);
+```
+
+## Description
+
+Requires the &#039;VIEW_AUDIT_LOG&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns an audit log object for the guild.
+
+Can Return:
+
+* audit log

+ 28 - 0
docs/_docs/Channel/Add Pinned Channel Message.md

@@ -0,0 +1,28 @@
+---
+title: Add Pinned Channel Message
+category: Channel
+order: 21
+---
+
+# `addPinnedChannelMessage`
+
+```php
+$client->channel->addPinnedChannelMessage($parameters);
+```
+
+## Description
+
+Pin a message in a channel. Requires the &#039;MANAGE_MESSAGES&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 27 - 0
docs/_docs/Channel/Bulk Delete Messages (deprecated).md

@@ -0,0 +1,27 @@
+---
+title: Bulk Delete Messages (Deprecated)
+category: Channel
+order: 14
+---
+
+# `bulkDeleteMessages`
+
+```php
+$client->channel->bulkDeleteMessages($parameters);
+```
+
+## Description
+
+Same as above, but this endpoint is deprecated.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Possibly No Response
+

+ 34 - 0
docs/_docs/Channel/Create Channel Invite.md

@@ -0,0 +1,34 @@
+---
+title: Create Channel Invite
+category: Channel
+order: 17
+---
+
+# `createChannelInvite`
+
+```php
+$client->channel->createChannelInvite($parameters);
+```
+
+## Description
+
+Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON paramaters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}).
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+max_age | integer | false | 86400
+max_uses | integer | false | 0
+temporary | bool | false | *null*
+unique | bool | false | *null*
+
+## Response
+
+Returns an invite object.
+
+Can Return:
+
+* invite

+ 33 - 0
docs/_docs/Channel/Create Message.md

@@ -0,0 +1,33 @@
+---
+title: Create Message
+category: Channel
+order: 6
+---
+
+# `createMessage`
+
+```php
+$client->channel->createMessage($parameters);
+```
+
+## Description
+
+Before using this endpoint, you must connect to and identify with a gateway at least once.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+content | string | false | *null*
+nonce | snowflake | false | *null*
+tts | bool | false | *null*
+file | file contents | false | *null*
+embed | object | false | *null*
+payload_json | string | false | *null*
+
+## Response
+
+Possibly No Response
+

+ 29 - 0
docs/_docs/Channel/Create Reaction.md

@@ -0,0 +1,29 @@
+---
+title: Create Reaction
+category: Channel
+order: 7
+---
+
+# `createReaction`
+
+```php
+$client->channel->createReaction($parameters);
+```
+
+## Description
+
+Create a reaction for the message. This endpoint requires the &#039;READ_MESSAGE_HISTORY&#039; permission to be present on the current user.  Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the &#039;ADD_REACTIONS&#039; permission to be present on the current user.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+emoji | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Channel/Delete All Reactions.md

@@ -0,0 +1,28 @@
+---
+title: Delete All Reactions
+category: Channel
+order: 11
+---
+
+# `deleteAllReactions`
+
+```php
+$client->channel->deleteAllReactions($parameters);
+```
+
+## Description
+
+Deletes all reactions on a message. This endpoint requires the &#039;MANAGE_MESSAGES&#039; permission to be present on the current user.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+
+## Response
+
+Possibly No Response
+

+ 28 - 0
docs/_docs/Channel/Delete Channel Permission.md

@@ -0,0 +1,28 @@
+---
+title: Delete Channel Permission
+category: Channel
+order: 18
+---
+
+# `deleteChannelPermission`
+
+```php
+$client->channel->deleteChannelPermission($parameters);
+```
+
+## Description
+
+Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the &#039;MANAGE_ROLES&#039; permission.  For more information about permissions, see permissions
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+overwrite.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Channel/Delete Message.md

@@ -0,0 +1,28 @@
+---
+title: Delete Message
+category: Channel
+order: 13
+---
+
+# `deleteMessage`
+
+```php
+$client->channel->deleteMessage($parameters);
+```
+
+## Description
+
+Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the &#039;MANAGE_MESSAGES&#039; permission.  Fires a Message Delete Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 29 - 0
docs/_docs/Channel/Delete Own Reaction.md

@@ -0,0 +1,29 @@
+---
+title: Delete Own Reaction
+category: Channel
+order: 8
+---
+
+# `deleteOwnReaction`
+
+```php
+$client->channel->deleteOwnReaction($parameters);
+```
+
+## Description
+
+Delete a reaction the current user has made for the message.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+emoji | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Channel/Delete Pinned Channel Message.md

@@ -0,0 +1,28 @@
+---
+title: Delete Pinned Channel Message
+category: Channel
+order: 22
+---
+
+# `deletePinnedChannelMessage`
+
+```php
+$client->channel->deletePinnedChannelMessage($parameters);
+```
+
+## Description
+
+Delete a pinned message in a channel. Requires the &#039;MANAGE_MESSAGES&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 30 - 0
docs/_docs/Channel/Delete User Reaction.md

@@ -0,0 +1,30 @@
+---
+title: Delete User Reaction
+category: Channel
+order: 9
+---
+
+# `deleteUserReaction`
+
+```php
+$client->channel->deleteUserReaction($parameters);
+```
+
+## Description
+
+Deletes another user&#039;s reaction. This endpoint requires the &#039;MANAGE_MESSAGES&#039; permission to be present on the current user.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+emoji | string | true | *null*
+user.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 30 - 0
docs/_docs/Channel/Delete or Close Channel.md

@@ -0,0 +1,30 @@
+---
+title: Delete/close Channel
+category: Channel
+order: 3
+---
+
+# `deleteOrcloseChannel`
+
+```php
+$client->channel->deleteOrcloseChannel($parameters);
+```
+
+## Description
+
+Delete a channel, or close a private message. Requires the &#039;MANAGE_CHANNELS&#039; permission for the guild. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them.  Fires a Channel Delete Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Returns a channel object on success.
+
+Can Return:
+
+* channel

+ 31 - 0
docs/_docs/Channel/Edit Channel Permissions.md

@@ -0,0 +1,31 @@
+---
+title: Edit Channel Permissions
+category: Channel
+order: 15
+---
+
+# `editChannelPermissions`
+
+```php
+$client->channel->editChannelPermissions($parameters);
+```
+
+## Description
+
+Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the &#039;MANAGE_ROLES&#039; permission.  For more information about permissions, see permissions.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+overwrite.id | string | true | *null*
+allow | integer | false | *null*
+deny | integer | false | *null*
+type | string | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 33 - 0
docs/_docs/Channel/Edit Message.md

@@ -0,0 +1,33 @@
+---
+title: Edit Message
+category: Channel
+order: 12
+---
+
+# `editMessage`
+
+```php
+$client->channel->editMessage($parameters);
+```
+
+## Description
+
+Edit a previously sent message. You can only edit messages that have been sent by the current user.  Fires a Message Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+content | string | false | *null*
+embed | object | false | *null*
+
+## Response
+
+Returns a message object.
+
+Can Return:
+
+* message

+ 31 - 0
docs/_docs/Channel/Get Channel Invites.md

@@ -0,0 +1,31 @@
+---
+title: Get Channel Invites
+category: Channel
+order: 16
+---
+
+# `getChannelInvites`
+
+```php
+$client->channel->getChannelInvites($parameters);
+```
+
+## Description
+
+Only usable for guild channels. Requires the &#039;MANAGE_CHANNELS&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of invite objects (with invite metadata) for the channel.
+
+Can Return:
+
+* invite
+* invite metadata

+ 28 - 0
docs/_docs/Channel/Get Channel Message.md

@@ -0,0 +1,28 @@
+---
+title: Get Channel Message
+category: Channel
+order: 5
+---
+
+# `getChannelMessage`
+
+```php
+$client->channel->getChannelMessage($parameters);
+```
+
+## Description
+
+If operating on a guild channel, this endpoints requires the &#039;READ_MESSAGE_HISTORY&#039; permission to be present on the current user.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+
+## Response
+
+Returns a specific message in the channel.
+

+ 31 - 0
docs/_docs/Channel/Get Channel Messages.md

@@ -0,0 +1,31 @@
+---
+title: Get Channel Messages
+category: Channel
+order: 4
+---
+
+# `getChannelMessages`
+
+```php
+$client->channel->getChannelMessages($parameters);
+```
+
+## Description
+
+If operating on a guild channel, this endpoint requires the &#039;VIEW_CHANNEL&#039; permission to be present on the current user. If the current user is missing the &#039;READ_MESSAGE_HISTORY&#039; permission in the channel then this will return no messages (since they cannot read the message history).
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+around | snowflake | false | *null*
+before | snowflake | false | *null*
+after | snowflake | false | *null*
+limit | integer | false | 50
+
+## Response
+
+Returns the messages for a channel.
+

+ 30 - 0
docs/_docs/Channel/Get Channel.md

@@ -0,0 +1,30 @@
+---
+title: Get Channel
+category: Channel
+order: 1
+---
+
+# `getChannel`
+
+```php
+$client->channel->getChannel($parameters);
+```
+
+## Description
+
+Get a channel by ID.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Returns a channel object.
+
+Can Return:
+
+* channel

+ 30 - 0
docs/_docs/Channel/Get Pinned Messages.md

@@ -0,0 +1,30 @@
+---
+title: Get Pinned Messages
+category: Channel
+order: 20
+---
+
+# `getPinnedMessages`
+
+```php
+$client->channel->getPinnedMessages($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Returns all pinned messages in the channel as an array of message objects.
+
+Can Return:
+
+* message

+ 35 - 0
docs/_docs/Channel/Get Reactions.md

@@ -0,0 +1,35 @@
+---
+title: Get Reactions
+category: Channel
+order: 10
+---
+
+# `getReactions`
+
+```php
+$client->channel->getReactions($parameters);
+```
+
+## Description
+
+Get a list of users that reacted with this emoji.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+message.id | snowflake | true | *null*
+emoji | string | true | *null*
+before | snowflake | false | *null*
+after | snowflake | false | *null*
+limit | integer | false | 100
+
+## Response
+
+Returns an array of user objects on success.
+
+Can Return:
+
+* user

+ 30 - 0
docs/_docs/Channel/Group DM Add Recipient.md

@@ -0,0 +1,30 @@
+---
+title: Group Dm Add Recipient
+category: Channel
+order: 23
+---
+
+# `groupDmAddRecipient`
+
+```php
+$client->channel->groupDmAddRecipient($parameters);
+```
+
+## Description
+
+Adds a recipient to a Group DM using their access token
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+access_token | string | false | *null*
+nick | string | false | *null*
+
+## Response
+
+Possibly No Response
+

+ 28 - 0
docs/_docs/Channel/Group DM Remove Recipient.md

@@ -0,0 +1,28 @@
+---
+title: Group Dm Remove Recipient
+category: Channel
+order: 24
+---
+
+# `groupDmRemoveRecipient`
+
+```php
+$client->channel->groupDmRemoveRecipient($parameters);
+```
+
+## Description
+
+Removes a recipient from a Group DM
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+
+## Response
+
+Possibly No Response
+

+ 38 - 0
docs/_docs/Channel/Modify Channel.md

@@ -0,0 +1,38 @@
+---
+title: Modify Channel
+category: Channel
+order: 2
+---
+
+# `modifyChannel`
+
+```php
+$client->channel->modifyChannel($parameters);
+```
+
+## Description
+
+Update a channels settings. Requires the &#039;MANAGE_CHANNELS&#039; permission for the guild.  Fires a Channel Update Gateway event. If modifying a category, individual Channel Update events will fire for each child channel that also changes. For the PATCH method, all the JSON Params are optional.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+name | string | false | *null*
+position | integer | false | *null*
+topic | string | false | *null*
+nsfw | bool | false | *null*
+bitrate | integer | false | *null*
+user_limit | integer | false | *null*
+permission_overwrites | array | false | *null*
+parent_id | snowflake | false | *null*
+
+## Response
+
+Returns a channel on success, and a 400 BAD REQUEST on invalid parameters.
+
+Can Return:
+
+* channel

+ 27 - 0
docs/_docs/Channel/Trigger Typing Indicator.md

@@ -0,0 +1,27 @@
+---
+title: Trigger Typing Indicator
+category: Channel
+order: 19
+---
+
+# `triggerTypingIndicator`
+
+```php
+$client->channel->triggerTypingIndicator($parameters);
+```
+
+## Description
+
+Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message.  Fires a Typing Start Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+channel.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 33 - 0
docs/_docs/Emoji/Create Guild Emoji.md

@@ -0,0 +1,33 @@
+---
+title: Create Guild Emoji
+category: Emoji
+order: 3
+---
+
+# `createGuildEmoji`
+
+```php
+$client->emoji->createGuildEmoji($parameters);
+```
+
+## Description
+
+Create a new emoji for the guild. Requires the &#039;MANAGE_EMOJIS&#039; permission.  Fires a Guild Emojis Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+name | string | false | *null*
+image | string | false | *null*
+roles | array | false | *null*
+
+## Response
+
+Returns the new emoji object on success.
+
+Can Return:
+
+* emoji

+ 28 - 0
docs/_docs/Emoji/Delete Guild Emoji.md

@@ -0,0 +1,28 @@
+---
+title: Delete Guild Emoji
+category: Emoji
+order: 5
+---
+
+# `deleteGuildEmoji`
+
+```php
+$client->emoji->deleteGuildEmoji($parameters);
+```
+
+## Description
+
+Delete the given emoji. Requires the &#039;MANAGE_EMOJIS&#039; permission.  Fires a Guild Emojis Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+emoji.id | string | true | *null*
+
+## Response
+
+Returns 204 No Content on success.
+

+ 31 - 0
docs/_docs/Emoji/Get Guild Emoji.md

@@ -0,0 +1,31 @@
+---
+title: Get Guild Emoji
+category: Emoji
+order: 2
+---
+
+# `getGuildEmoji`
+
+```php
+$client->emoji->getGuildEmoji($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+emoji.id | string | true | *null*
+
+## Response
+
+Returns an emoji object for the given guild and emoji IDs.
+
+Can Return:
+
+* emoji

+ 30 - 0
docs/_docs/Emoji/List Guild Emojis.md

@@ -0,0 +1,30 @@
+---
+title: List Guild Emojis
+category: Emoji
+order: 1
+---
+
+# `listGuildEmojis`
+
+```php
+$client->emoji->listGuildEmojis($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of emoji objects for the given guild.
+
+Can Return:
+
+* emoji

+ 33 - 0
docs/_docs/Emoji/Modify Guild Emoji.md

@@ -0,0 +1,33 @@
+---
+title: Modify Guild Emoji
+category: Emoji
+order: 4
+---
+
+# `modifyGuildEmoji`
+
+```php
+$client->emoji->modifyGuildEmoji($parameters);
+```
+
+## Description
+
+Modify the given emoji. Requires the &#039;MANAGE_EMOJIS&#039; permission.  Fires a Guild Emojis Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+emoji.id | string | true | *null*
+name | string | false | *null*
+roles | array | false | *null*
+
+## Response
+
+Returns the updated emoji object on success.
+
+Can Return:
+
+* emoji

+ 24 - 0
docs/_docs/Gateway/Get Gateway Bot.md

@@ -0,0 +1,24 @@
+---
+title: Get Gateway Bot
+category: Gateway
+order: 2
+---
+
+# `getGatewayBot`
+
+```php
+$client->gateway->getGatewayBot($parameters);
+```
+
+## Description
+
+This endpoint requires authentication using a valid bot token.
+
+## Parameters
+
+No Parameters
+
+## Response
+
+Possibly No Response
+

+ 24 - 0
docs/_docs/Gateway/Get Gateway.md

@@ -0,0 +1,24 @@
+---
+title: Get Gateway
+category: Gateway
+order: 1
+---
+
+# `getGateway`
+
+```php
+$client->gateway->getGateway($parameters);
+```
+
+## Description
+
+This endpoint does not require authentication.
+
+## Parameters
+
+No Parameters
+
+## Response
+
+Possibly No Response
+

+ 29 - 0
docs/_docs/Guild/Add Guild Member Role.md

@@ -0,0 +1,29 @@
+---
+title: Add Guild Member Role
+category: Guild
+order: 13
+---
+
+# `addGuildMemberRole`
+
+```php
+$client->guild->addGuildMemberRole($parameters);
+```
+
+## Description
+
+Adds a role to a guild member. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires a Guild Member Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+role.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 36 - 0
docs/_docs/Guild/Add Guild Member.md

@@ -0,0 +1,36 @@
+---
+title: Add Guild Member
+category: Guild
+order: 10
+---
+
+# `addGuildMember`
+
+```php
+$client->guild->addGuildMember($parameters);
+```
+
+## Description
+
+Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope.  Fires a Guild Member Add Gateway event. Requires the bot to have the CREATE_INSTANT_INVITE permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+access_token | string | false | *null*
+nick | string | false | *null*
+roles | array | false | *null*
+mute | bool | false | *null*
+deaf | bool | false | *null*
+
+## Response
+
+Returns a 201 Created with the guild member as the body.
+
+Can Return:
+
+* guild member

+ 28 - 0
docs/_docs/Guild/Begin Guild Prune.md

@@ -0,0 +1,28 @@
+---
+title: Begin Guild Prune
+category: Guild
+order: 25
+---
+
+# `beginGuildPrune`
+
+```php
+$client->guild->beginGuildPrune($parameters);
+```
+
+## Description
+
+Begin a prune operation. Requires the &#039;KICK_MEMBERS&#039; permission.  Fires multiple Guild Member Remove Gateway events.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+days | integer | false | *null*
+
+## Response
+
+Returns an object with one &#039;pruned&#039; key indicating the number of members that were removed in the prune operation.
+

+ 30 - 0
docs/_docs/Guild/Create Guild Ban.md

@@ -0,0 +1,30 @@
+---
+title: Create Guild Ban
+category: Guild
+order: 17
+---
+
+# `createGuildBan`
+
+```php
+$client->guild->createGuildBan($parameters);
+```
+
+## Description
+
+Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the &#039;BAN_MEMBERS&#039; permission.  Fires a Guild Ban Add Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+delete-message-days | integer | false | *null*
+reason | string | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 37 - 0
docs/_docs/Guild/Create Guild Channel.md

@@ -0,0 +1,37 @@
+---
+title: Create Guild Channel
+category: Guild
+order: 6
+---
+
+# `createGuildChannel`
+
+```php
+$client->guild->createGuildChannel($parameters);
+```
+
+## Description
+
+Create a new channel object for the guild. Requires the &#039;MANAGE_CHANNELS&#039; permission.  Fires a Channel Create Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+name | string | false | *null*
+type | integer | false | *null*
+bitrate | integer | false | *null*
+user_limit | integer | false | *null*
+permission_overwrites | array | false | *null*
+parent_id | snowflake | false | *null*
+nsfw | bool | false | *null*
+
+## Response
+
+Returns the new channel object on success.
+
+Can Return:
+
+* channel

+ 29 - 0
docs/_docs/Guild/Create Guild Integration.md

@@ -0,0 +1,29 @@
+---
+title: Create Guild Integration
+category: Guild
+order: 29
+---
+
+# `createGuildIntegration`
+
+```php
+$client->guild->createGuildIntegration($parameters);
+```
+
+## Description
+
+Attach an integration object from the current user to the guild. Requires the &#039;MANAGE_GUILD&#039; permission.  Fires a Guild Integrations Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+type | string | false | *null*
+id | snowflake | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 35 - 0
docs/_docs/Guild/Create Guild Role.md

@@ -0,0 +1,35 @@
+---
+title: Create Guild Role
+category: Guild
+order: 20
+---
+
+# `createGuildRole`
+
+```php
+$client->guild->createGuildRole($parameters);
+```
+
+## Description
+
+Create a new role for the guild. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires a Guild Role Create Gateway event. All JSON params are optional.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+name | string | false | &quot;new role&quot;
+permissions | integer | false | *null*
+color | integer | false | 0
+hoist | bool | false | *null*
+mentionable | bool | false | *null*
+
+## Response
+
+Returns the new role object on success.
+
+Can Return:
+
+* role

+ 37 - 0
docs/_docs/Guild/Create Guild.md

@@ -0,0 +1,37 @@
+---
+title: Create Guild
+category: Guild
+order: 1
+---
+
+# `createGuild`
+
+```php
+$client->guild->createGuild($parameters);
+```
+
+## Description
+
+Create a new guild.  Fires a Guild Create Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+name | string | false | *null*
+region | string | false | *null*
+icon | string | false | *null*
+verification_level | integer | false | *null*
+default_message_notifications | integer | false | *null*
+explicit_content_filter | integer | false | *null*
+roles | array | false | *null*
+channels | array | false | *null*
+
+## Response
+
+Returns a guild object on success.
+
+Can Return:
+
+* guild

+ 28 - 0
docs/_docs/Guild/Delete Guild Integration.md

@@ -0,0 +1,28 @@
+---
+title: Delete Guild Integration
+category: Guild
+order: 31
+---
+
+# `deleteGuildIntegration`
+
+```php
+$client->guild->deleteGuildIntegration($parameters);
+```
+
+## Description
+
+Delete the attached integration object for the guild. Requires the &#039;MANAGE_GUILD&#039; permission.  Fires a Guild Integrations Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+integration.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Guild/Delete Guild Role.md

@@ -0,0 +1,28 @@
+---
+title: Delete Guild Role
+category: Guild
+order: 23
+---
+
+# `deleteGuildRole`
+
+```php
+$client->guild->deleteGuildRole($parameters);
+```
+
+## Description
+
+Delete a guild role. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires a Guild Role Delete Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+role.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 27 - 0
docs/_docs/Guild/Delete Guild.md

@@ -0,0 +1,27 @@
+---
+title: Delete Guild
+category: Guild
+order: 4
+---
+
+# `deleteGuild`
+
+```php
+$client->guild->deleteGuild($parameters);
+```
+
+## Description
+
+Delete a guild permanently. User must be owner.  Fires a Guild Delete Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns 204 No Content on success.
+

+ 30 - 0
docs/_docs/Guild/Get Guild Bans.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Bans
+category: Guild
+order: 16
+---
+
+# `getGuildBans`
+
+```php
+$client->guild->getGuildBans($parameters);
+```
+
+## Description
+
+Requires the &#039;BAN_MEMBERS&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of ban objects for the users banned from this guild.
+
+Can Return:
+
+* ban

+ 30 - 0
docs/_docs/Guild/Get Guild Channels.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Channels
+category: Guild
+order: 5
+---
+
+# `getGuildChannels`
+
+```php
+$client->guild->getGuildChannels($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of guild channel objects.
+
+Can Return:
+
+* channel

+ 30 - 0
docs/_docs/Guild/Get Guild Embed.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Embed
+category: Guild
+order: 33
+---
+
+# `getGuildEmbed`
+
+```php
+$client->guild->getGuildEmbed($parameters);
+```
+
+## Description
+
+Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns the guild embed object.
+
+Can Return:
+
+* guild embed

+ 30 - 0
docs/_docs/Guild/Get Guild Integrations.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Integrations
+category: Guild
+order: 28
+---
+
+# `getGuildIntegrations`
+
+```php
+$client->guild->getGuildIntegrations($parameters);
+```
+
+## Description
+
+Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of integration objects for the guild.
+
+Can Return:
+
+* integration

+ 31 - 0
docs/_docs/Guild/Get Guild Invites.md

@@ -0,0 +1,31 @@
+---
+title: Get Guild Invites
+category: Guild
+order: 27
+---
+
+# `getGuildInvites`
+
+```php
+$client->guild->getGuildInvites($parameters);
+```
+
+## Description
+
+Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of invite objects (with invite metadata) for the guild.
+
+Can Return:
+
+* invite
+* invite metadata

+ 31 - 0
docs/_docs/Guild/Get Guild Member.md

@@ -0,0 +1,31 @@
+---
+title: Get Guild Member
+category: Guild
+order: 8
+---
+
+# `getGuildMember`
+
+```php
+$client->guild->getGuildMember($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+
+## Response
+
+Returns a guild member object for the specified user.
+
+Can Return:
+
+* guild member

+ 28 - 0
docs/_docs/Guild/Get Guild Prune Count.md

@@ -0,0 +1,28 @@
+---
+title: Get Guild Prune Count
+category: Guild
+order: 24
+---
+
+# `getGuildPruneCount`
+
+```php
+$client->guild->getGuildPruneCount($parameters);
+```
+
+## Description
+
+Requires the &#039;KICK_MEMBERS&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+days | integer | false | *null*
+
+## Response
+
+Returns an object with one &#039;pruned&#039; key indicating the number of members that would be removed in a prune operation.
+

+ 30 - 0
docs/_docs/Guild/Get Guild Roles.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Roles
+category: Guild
+order: 19
+---
+
+# `getGuildRoles`
+
+```php
+$client->guild->getGuildRoles($parameters);
+```
+
+## Description
+
+Requires the &#039;MANAGE_ROLES&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of role objects for the guild.
+
+Can Return:
+
+* role

+ 30 - 0
docs/_docs/Guild/Get Guild Vanity URL.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Vanity Url
+category: Guild
+order: 35
+---
+
+# `getGuildVanityUrl`
+
+```php
+$client->guild->getGuildVanityUrl($parameters);
+```
+
+## Description
+
+Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a partial invite object for guilds with that feature enabled.
+
+Can Return:
+
+* invite

+ 30 - 0
docs/_docs/Guild/Get Guild Voice Regions.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild Voice Regions
+category: Guild
+order: 26
+---
+
+# `getGuildVoiceRegions`
+
+```php
+$client->guild->getGuildVoiceRegions($parameters);
+```
+
+## Description
+
+Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a list of voice region objects for the guild.
+
+Can Return:
+
+* voice region

+ 30 - 0
docs/_docs/Guild/Get Guild.md

@@ -0,0 +1,30 @@
+---
+title: Get Guild
+category: Guild
+order: 2
+---
+
+# `getGuild`
+
+```php
+$client->guild->getGuild($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns the guild object for the given id.
+
+Can Return:
+
+* guild

+ 32 - 0
docs/_docs/Guild/List Guild Members.md

@@ -0,0 +1,32 @@
+---
+title: List Guild Members
+category: Guild
+order: 9
+---
+
+# `listGuildMembers`
+
+```php
+$client->guild->listGuildMembers($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+limit | integer | false | 1
+after | snowflake | false | *null*
+
+## Response
+
+Returns a list of guild member objects that are members of the guild.
+
+Can Return:
+
+* guild member

+ 28 - 0
docs/_docs/Guild/Modify Current User Nick.md

@@ -0,0 +1,28 @@
+---
+title: Modify Current User Nick
+category: Guild
+order: 12
+---
+
+# `modifyCurrentUserNick`
+
+```php
+$client->guild->modifyCurrentUserNick($parameters);
+```
+
+## Description
+
+Modifies the nickname of the current user in a guild.  Fires a Guild Member Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+nick | string | false | *null*
+
+## Response
+
+Returns a 200 with the nickname on success.
+

+ 29 - 0
docs/_docs/Guild/Modify Guild Channel Positions.md

@@ -0,0 +1,29 @@
+---
+title: Modify Guild Channel Positions
+category: Guild
+order: 7
+---
+
+# `modifyGuildChannelPositions`
+
+```php
+$client->guild->modifyGuildChannelPositions($parameters);
+```
+
+## Description
+
+Modify the positions of a set of channel objects for the guild. Requires &#039;MANAGE_CHANNELS&#039; permission.  Fires multiple Channel Update Gateway events.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+id | snowflake | false | *null*
+position | integer | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 30 - 0
docs/_docs/Guild/Modify Guild Embed.md

@@ -0,0 +1,30 @@
+---
+title: Modify Guild Embed
+category: Guild
+order: 34
+---
+
+# `modifyGuildEmbed`
+
+```php
+$client->guild->modifyGuildEmbed($parameters);
+```
+
+## Description
+
+Modify a guild embed object for the guild. All attributes may be passed in with JSON and modified. Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns the updated guild embed object.
+
+Can Return:
+
+* guild embed

+ 31 - 0
docs/_docs/Guild/Modify Guild Integration.md

@@ -0,0 +1,31 @@
+---
+title: Modify Guild Integration
+category: Guild
+order: 30
+---
+
+# `modifyGuildIntegration`
+
+```php
+$client->guild->modifyGuildIntegration($parameters);
+```
+
+## Description
+
+Modify the behavior and settings of a integration object for the guild. Requires the &#039;MANAGE_GUILD&#039; permission.  Fires a Guild Integrations Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+integration.id | string | true | *null*
+expire_behavior | integer | false | *null*
+expire_grace_period | integer | false | *null*
+enable_emoticons | bool | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 33 - 0
docs/_docs/Guild/Modify Guild Member.md

@@ -0,0 +1,33 @@
+---
+title: Modify Guild Member
+category: Guild
+order: 11
+---
+
+# `modifyGuildMember`
+
+```php
+$client->guild->modifyGuildMember($parameters);
+```
+
+## Description
+
+Modify attributes of a guild member.  Fires a Guild Member Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+nick | string | false | *null*
+roles | array | false | *null*
+mute | bool | false | *null*
+deaf | bool | false | *null*
+channel_id | snowflake | false | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 32 - 0
docs/_docs/Guild/Modify Guild Role Positions.md

@@ -0,0 +1,32 @@
+---
+title: Modify Guild Role Positions
+category: Guild
+order: 21
+---
+
+# `modifyGuildRolePositions`
+
+```php
+$client->guild->modifyGuildRolePositions($parameters);
+```
+
+## Description
+
+Modify the positions of a set of role objects for the guild. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires multiple Guild Role Update Gateway events.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+id | snowflake | false | *null*
+position | integer | false | *null*
+
+## Response
+
+Returns a list of all of the guild&#039;s role objects on success.
+
+Can Return:
+
+* role

+ 36 - 0
docs/_docs/Guild/Modify Guild Role.md

@@ -0,0 +1,36 @@
+---
+title: Modify Guild Role
+category: Guild
+order: 22
+---
+
+# `modifyGuildRole`
+
+```php
+$client->guild->modifyGuildRole($parameters);
+```
+
+## Description
+
+Modify a guild role. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires a Guild Role Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+role.id | string | true | *null*
+name | string | false | *null*
+permissions | integer | false | *null*
+color | integer | false | *null*
+hoist | bool | false | *null*
+mentionable | bool | false | *null*
+
+## Response
+
+Returns the updated role on success.
+
+Can Return:
+
+* role

+ 41 - 0
docs/_docs/Guild/Modify Guild.md

@@ -0,0 +1,41 @@
+---
+title: Modify Guild
+category: Guild
+order: 3
+---
+
+# `modifyGuild`
+
+```php
+$client->guild->modifyGuild($parameters);
+```
+
+## Description
+
+Modify a guild&#039;s settings. Requires the &#039;MANAGE_GUILD&#039; permission.  Fires a Guild Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+name | string | false | *null*
+region | string | false | *null*
+verification_level | integer | false | *null*
+default_message_notifications | integer | false | *null*
+explicit_content_filter | integer | false | *null*
+afk_channel_id | snowflake | false | *null*
+afk_timeout | integer | false | *null*
+icon | string | false | *null*
+owner_id | snowflake | false | *null*
+splash | string | false | *null*
+system_channel_id | snowflake | false | *null*
+
+## Response
+
+Returns the updated guild object on success.
+
+Can Return:
+
+* guild

+ 28 - 0
docs/_docs/Guild/Remove Guild Ban.md

@@ -0,0 +1,28 @@
+---
+title: Remove Guild Ban
+category: Guild
+order: 18
+---
+
+# `removeGuildBan`
+
+```php
+$client->guild->removeGuildBan($parameters);
+```
+
+## Description
+
+Remove the ban for a user. Requires the &#039;BAN_MEMBERS&#039; permissions.  Fires a Guild Ban Remove Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 29 - 0
docs/_docs/Guild/Remove Guild Member Role.md

@@ -0,0 +1,29 @@
+---
+title: Remove Guild Member Role
+category: Guild
+order: 14
+---
+
+# `removeGuildMemberRole`
+
+```php
+$client->guild->removeGuildMemberRole($parameters);
+```
+
+## Description
+
+Removes a role from a guild member. Requires the &#039;MANAGE_ROLES&#039; permission.  Fires a Guild Member Update Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+role.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Guild/Remove Guild Member.md

@@ -0,0 +1,28 @@
+---
+title: Remove Guild Member
+category: Guild
+order: 15
+---
+
+# `removeGuildMember`
+
+```php
+$client->guild->removeGuildMember($parameters);
+```
+
+## Description
+
+Remove a member from a guild. Requires &#039;KICK_MEMBERS&#039; permission.  Fires a Guild Member Remove Gateway event.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+user.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Guild/Sync Guild Integration.md

@@ -0,0 +1,28 @@
+---
+title: Sync Guild Integration
+category: Guild
+order: 32
+---
+
+# `syncGuildIntegration`
+
+```php
+$client->guild->syncGuildIntegration($parameters);
+```
+
+## Description
+
+Sync an integration. Requires the &#039;MANAGE_GUILD&#039; permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+integration.id | string | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 28 - 0
docs/_docs/Guild/Update Current Users' Nickname.md

@@ -0,0 +1,28 @@
+---
+title: Update Current Users&#039; Nickname
+category: Guild
+order: 36
+---
+
+# `updateNick`
+
+```php
+$client->guild->updateNick($parameters);
+```
+
+## Description
+
+Updates the bots nickname in a server
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | false | *null*
+nick | string | false | *null*
+
+## Response
+
+Returns the nick
+

+ 27 - 0
docs/_docs/Invite/Accept Invite.md

@@ -0,0 +1,27 @@
+---
+title: Accept Invite
+category: Invite
+order: 3
+---
+
+# `acceptInvite`
+
+```php
+$client->invite->acceptInvite($parameters);
+```
+
+## Description
+
+This endpoint is deprecated and will be discontinued on March 23, 2018. Add Guild Member should be used in its place.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+invite.code | string | true | *null*
+
+## Response
+
+Possibly No Response
+

+ 30 - 0
docs/_docs/Invite/Delete Invite.md

@@ -0,0 +1,30 @@
+---
+title: Delete Invite
+category: Invite
+order: 2
+---
+
+# `deleteInvite`
+
+```php
+$client->invite->deleteInvite($parameters);
+```
+
+## Description
+
+Delete an invite. Requires the MANAGE_CHANNELS permission.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+invite.code | string | true | *null*
+
+## Response
+
+Returns an invite object on success.
+
+Can Return:
+
+* invite

+ 30 - 0
docs/_docs/Invite/Get Invite.md

@@ -0,0 +1,30 @@
+---
+title: Get Invite
+category: Invite
+order: 1
+---
+
+# `getInvite`
+
+```php
+$client->invite->getInvite($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+invite.code | string | true | *null*
+
+## Response
+
+Returns an invite object for the given code.
+
+Can Return:
+
+* invite

+ 34 - 0
docs/_docs/Oauth2/Get Current Application Information.md

@@ -0,0 +1,34 @@
+---
+title: Get Current Application Information
+category: Oauth2
+order: 1
+---
+
+# `getCurrentApplicationInformation`
+
+```php
+$client->oauth2->getCurrentApplicationInformation($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+id | snowflake | false | *null*
+name | string | false | *null*
+icon? | string | false | *null*
+description? | string | false | *null*
+rpc_origins? | array | false | *null*
+bot_public | bool | false | *null*
+bot_require_code_grant | bool | false | *null*
+owner | object | false | *null*
+
+## Response
+
+Returns the bot&#039;s OAuth2 application info.
+

+ 30 - 0
docs/_docs/User/Create DM.md

@@ -0,0 +1,30 @@
+---
+title: Create Dm
+category: User
+order: 7
+---
+
+# `createDm`
+
+```php
+$client->user->createDm($parameters);
+```
+
+## Description
+
+Create a new DM channel with a user.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+recipient_id | snowflake | false | *null*
+
+## Response
+
+Returns a DM channel object.
+
+Can Return:
+
+* DM channel

+ 31 - 0
docs/_docs/User/Create Group DM.md

@@ -0,0 +1,31 @@
+---
+title: Create Group Dm
+category: User
+order: 8
+---
+
+# `createGroupDm`
+
+```php
+$client->user->createGroupDm($parameters);
+```
+
+## Description
+
+Create a new group DM channel with multiple users.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+access_tokens | array | false | *null*
+nicks | dict | false | *null*
+
+## Response
+
+Returns a DM channel object.
+
+Can Return:
+
+* DM channel

+ 32 - 0
docs/_docs/User/Get Current User Guilds.md

@@ -0,0 +1,32 @@
+---
+title: Get Current User Guilds
+category: User
+order: 4
+---
+
+# `getCurrentUserGuilds`
+
+```php
+$client->user->getCurrentUserGuilds($parameters);
+```
+
+## Description
+
+Requires the guilds OAuth2 scope.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+before | snowflake | false | *null*
+after | snowflake | false | *null*
+limit | integer | false | 100
+
+## Response
+
+Returns a list of partial guild objects the current user is a member of.
+
+Can Return:
+
+* guild

+ 27 - 0
docs/_docs/User/Get Current User.md

@@ -0,0 +1,27 @@
+---
+title: Get Current User
+category: User
+order: 1
+---
+
+# `getCurrentUser`
+
+```php
+$client->user->getCurrentUser($parameters);
+```
+
+## Description
+
+For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email.
+
+## Parameters
+
+No Parameters
+
+## Response
+
+Returns the user object of the requester&#039;s account.
+
+Can Return:
+
+* user

+ 27 - 0
docs/_docs/User/Get User Connections.md

@@ -0,0 +1,27 @@
+---
+title: Get User Connections
+category: User
+order: 9
+---
+
+# `getUserConnections`
+
+```php
+$client->user->getUserConnections($parameters);
+```
+
+## Description
+
+Requires the connections OAuth2 scope.
+
+## Parameters
+
+No Parameters
+
+## Response
+
+Returns a list of connection objects.
+
+Can Return:
+
+* connection

+ 27 - 0
docs/_docs/User/Get User DMs.md

@@ -0,0 +1,27 @@
+---
+title: Get User Dms
+category: User
+order: 6
+---
+
+# `getUserDms`
+
+```php
+$client->user->getUserDms($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+No Parameters
+
+## Response
+
+Returns a list of DM channel objects.
+
+Can Return:
+
+* DM channel

+ 30 - 0
docs/_docs/User/Get User.md

@@ -0,0 +1,30 @@
+---
+title: Get User
+category: User
+order: 2
+---
+
+# `getUser`
+
+```php
+$client->user->getUser($parameters);
+```
+
+## Description
+
+
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+user.id | snowflake | true | *null*
+
+## Response
+
+Returns a user object for a given user ID.
+
+Can Return:
+
+* user

+ 27 - 0
docs/_docs/User/Leave Guild.md

@@ -0,0 +1,27 @@
+---
+title: Leave Guild
+category: User
+order: 5
+---
+
+# `leaveGuild`
+
+```php
+$client->user->leaveGuild($parameters);
+```
+
+## Description
+
+Leave a guild.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+guild.id | snowflake | true | *null*
+
+## Response
+
+Returns a 204 empty response on success.
+

+ 31 - 0
docs/_docs/User/Modify Current User.md

@@ -0,0 +1,31 @@
+---
+title: Modify Current User
+category: User
+order: 3
+---
+
+# `modifyCurrentUser`
+
+```php
+$client->user->modifyCurrentUser($parameters);
+```
+
+## Description
+
+Modify the requester&#039;s user account settings.
+
+## Parameters
+
+
+Name | Type | Required | Default
+--- | --- | --- | ---
+username | string | false | *null*
+avatar | avatar data | false | *null*
+
+## Response
+
+Returns a user object on success.
+
+Can Return:
+
+* user

+ 0 - 0
docs/_docs/Voice/List Voice Regions.md


Some files were not shown because too many files changed in this diff