UNPKG

discord-webhook-ts

Version:

Client & Type definitions for the Discord Webhooks API. 📘

29 lines (28 loc) • 822 B
import { AxiosInstance, AxiosPromise } from 'axios'; import * as Webhook from './Types/Webhook'; export default class DiscordWebhook { /** * Discord Webhook URL */ protected client: AxiosInstance; /** * Discord Webhook constructor */ constructor(webhookUrl: string); /** * Execute the current webhook. */ execute(options: Webhook.input.POST): Promise<import("axios").AxiosResponse<any, any>>; /** * Modify the current webhook. */ modify(options: Webhook.input.PATCH): Promise<import("axios").AxiosResponse<any, any>>; /** * Get the current webhook. */ get(): AxiosPromise<Webhook.response.GET>; /** * Check whether or not the current webhook is valid. */ isValid(): Promise<boolean>; }