-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebhookUtility.d.ts
34 lines (34 loc) · 1.23 KB
/
WebhookUtility.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { IWebhookContent } from "./interfaces/IWebhookContent";
import { WebhookConfiguration } from "./WebhookConfiguration";
/**
* Class that allows you to send messages via webhook.
* @private This class is private.
* @remarks To send webhook, use static method:
* ```ts
* WebhookUtility.sendWebhook(webhookUrl: string, { content = "", embeds = [] }: IWebhookContent);
* ```
*/
declare class WebhookUtility {
/**
* Default properties for webhooks.
* @readonly
*/
static readonly configuration: typeof WebhookConfiguration;
/**
* Class that allows you to send messages via webhook.
* @private This class is private.
* @remarks To send webhook, use static method:
* ```ts
* WebhookUtility.sendWebhook(webhookUrl: string, { content = "", embeds = [] }: IWebhookContent);
* ```
*/
private constructor();
/**
* Sends a messages via webhook to a channel.
* @param webhookUrl Link to a webhook.
* @param messageContent Content of a message.
* @returns Method does return whether webhook was succesfully sent.
*/
static sendWebhook(webhookUrl: string, { content, embeds }: IWebhookContent): Promise<boolean>;
}
export { WebhookUtility, IWebhookContent };