Skip to main content
Module

x/higa/mod.ts>WebhookManager

A package to interract with the Discord API coded by myself
Latest
class WebhookManager
Re-export
import { WebhookManager } from "https://deno.land/x/higa@0.1.2/mod.ts";

Constructors

new
WebhookManager(
token: string,
tokenType: string,
version: APIVersions,
)

Properties

readonly
version: APIVersions

API Version

Methods

createWebhook(
channelId: string,
name: string,
avatar?: any,
): Promise<Webhook>

Creates a webhook in the specified channel

deleteWebhook(webhookId: string): Promise<void>

Deletes a webhook

deleteWebhookMessage(
webhookId: string,
webhookToken: string,
messageId: string,
): Promise<void>
deleteWebhookWithToken(webhookId: string, webhookToken: string): Promise<void>

Deletes a webhook with the given ID and token

editWebhookMessage(
webhookId: string,
webhookToken: string,
messageId: string,
): Promise<Message>

Edit a webhook message

executeWebhook(
webhookId: string,
webhookToken: string,
): Promise<Message>

Executes a webhook

getChannelWebhooks(channelId: string): Promise<Webhook[]>

Get all webhooks in a channel

getGuilWebhooks(guildId: string): Promise<Webhook[]>

Gets all the webhooks in a guild.

getWebhook(webhookId: string): Promise<Webhook>

Gets a webhook by its ID

getWebhookMessage(
webhookId: string,
webhookToken: string,
messageId: string,
): Promise<Message>

Get a webhook message

getWebhookWithToken(webhookId: string, webhookToken: string): Promise<Webhook>

Gets a webhook with a token.

modifyWebhook(webhookId: string, options: ModifyWebhookOptions): Promise<Webhook>

Modify a webhook

modifyWebhookWithToken(
webhookId: string,
webhookToken: string,
options: ModifyWebhookOptions,
): Promise<Webhook>

Modify a webhook with a token.