updateChannelDetails
Updates a channel details
Requires
Channel ID
name
icon - base64 encoded
require('vendor/autoload.php');
use \HobsRkm\SDK\PHPDiscordSDK\PHPDiscordSDKFactory;
use \HobsRkm\SDK\PHPDiscordSDK\Actions\Channels;
/**
Required - Channel Id
Name - New channel Name
icon - base64 encoded icon
**/
$body = array(
"TYPE"=>"CHANNEL_DETAILS",
"body"=>array(
"channel_id"=><<YOUR CHANNEL ID>>>,
"name"=><<YOUR NEW CHANNEL NAME>>,
"icon"=><<<BASE 64 ENCODED ICON>>
)
);
PHPDiscordSDKFactory::getInstance('Channels')
->updateChannelDetails($body)
->then(function($data){
//channel details
print_r($data);
},
function ($error) {
//message event errors
print_r($error->getMessage());
});
Last updated
Was this helpful?