PHP code example of naneynonn / discord-wrapper
1. Go to this page and download the library: Download naneynonn/discord-wrapper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
naneynonn / discord-wrapper example snippets
use Naneynonn\Api\Client as DiscordApiClient;
use Naneynonn\Enums\RequestTypes;
$config = [
'bot' => [
'token' => '',
]
];
$api = new DiscordApiClient($config);
$guild = $api->guild->getGuild(guild_id: '');
// or
$guild = $api->request(method: RequestTypes::GET, endpoint: '/guilds/{guild.id}', options: ['params' => ['guild.id' => '']], cache_ttl: 600);