WebHooks
Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS
permission.
$discord->webhooks->channel("CHANNEL_ID");
Create a new webhook. Requires the MANAGE_WEBHOOKS
permission. Returns a webhook object on success.
$scope = "channel"; // or "guild"
$params = array( "name" => "WebHookName" );
$discord->webhooks->create($scope, $params);
Delete a webhook permanently. User must be owner. Returns a 204 NO CONTENT response on success.
$discord->webhooks->delete("WEBHOOK_ID");
Modify a webhook. Requires the MANAGE_WEBHOOKS
permission. Returns the updated webhook object on success.
$params = array( "name" => "NewWebHookName" );
$discord->webhooks->edit("WEBHOOK_ID", $params);
This endpoint supports both JSON and form data bodies. It does require multipart/form-data requests instead of the normal JSON request type when uploading files. Make sure you set your Content-Type to multipart/form-data if you're doing that. Note that in that case, the embeds field cannot be used, but you can pass an url-encoded JSON body as a form value for payload_json.
$discord->webhooks->execute("WEBHOOK_ID", "WEBHOOK_TOKEN");
Returns the new webhook object for the given id.
$discord->webhooks->get("WEBHOOK_ID");
Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS
permission.
$discord->webhooks->guild("GUILD_ID");
- bulkDelete
- create
- createInvite
- createMessage
- delete
- deleteMessage
- deletePin
- deleteReactions
- edit
- editMessage
- get
- message
- messageReactions
- messages
- pin
- pins
- react
- ban
- bans
- channels
- create
- createChannel
- createEmoji
- createIntegration
- createRole
- delete
- deleteChannel
- deleteEmoji
- deleteIntegration
- deleteRole
- edit
- editChannel
- editEmbed
- editEmoji
- editIntegration
- editRole
- embed
- emoji
- emojis
- get
- integrations
- invite
- invites
- kick
- member
- memberRole
- members
- regions
- removeMemberRole
- roles
- unban
- vanity
- widget
- channel
- create
- delete
- deleteByToken
- edit
- editByToken
- execute (alpha)
- executeGitHub
- executeSlack
- get
- guild