A 'guild' is Discord's name for server.
Also see:
$discord = new Discord($email_address, $password);
$serverName = 'My Server Name';
$region = 'us-west';
$guild = $discord->api('guild')->create($serverName, $region);
print_r($guild);
Returns an array with details about your new server.
Full list of regions
$discord = new Discord($email_address, $password);
$guildId = '<your_guild_id>';
$options = [
'name' => 'My New Guild Name',
'region' => 'us-east',
'icon' => 'http://i.imgur.com/a7kEVME.png',
'afk_channel_id' => '<your_voice_channel_id>'
];
$guild = $discord->api('guild')->edit($guildId, $options);
print_r($guild);
Returns an array with your updated server details.
If you leave any of the option fields out of the array, current values will be auto set for you.
$discord = new Discord($email_address, $password);
$guildId = '<your_guild_id>';
$discord->api('guild')->delete($guildId);
Will not return anything.
$discord = new Discord($email_address, $password);
$guildId = '<your_guild_id>';
$guild = $discord->api('guild')->show($guildId);
print_r($guild);
Returns an array with details about your new server.
$discord = new Discord($email_address, $password);
$guildId = '<your_guild_id>';
$enabled = false;
$channelId = '';
$guild = $discord->api('guild')->widget($guildId, $enabled, $channelId);
print_r($guild);
Returns an array with status of the widget.
Obtaining a list of Guild Channels
$discord = new Discord($email_address, $password);
$guildId = '<your_guild_id>';
$guildIcon = $discord->api('guild')->icon($guildId);
echo $guildIcon;
Returns a string of the url to your guild's icon.