Skip to main content
Module

x/commandis/mod.ts>Webhook

Official framework for Corddis lib ( for Deno only )
Latest
class Webhook
Re-export
import { Webhook } from "https://deno.land/x/commandis@v0.6.5/mod.ts";

Webhook Client with REST API communication.

Constructors

new
Webhook(initData: URLWebhook | IDWebhook | WebhookType)

Properties

inited: boolean
lastReq: number
origin: string
sleep: (t: number) => unknown
readonly
token: string

Methods

_fetch<T>(
method: string,
path: string,
body?: string | FormData | null,
json?,
contentType?: string | boolean,
headers?: any,
): Promise<T>
_performReq(req: Request): Promise<Response>
delete(): Promise<boolean>

Deletes a webhook.

edit(data: WebhookEditType): Promise<Webhook>

Modifies a webhook

send(data: WebhookMessageCreateType): Promise<boolean>

Executes a webhook