The webhook router for the Guilded REST API.

Example

new WebhookRouter(rest);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Create a webhook on Guilded.

    Returns

    The created webhook.

    Example

    webhooks.create('abc', 'abc', 'Webhook');
    

    Parameters

    • serverId: string

      The ID of the server the webhook belongs to.

    • channelId: string

      The ID of the channel the webhook belongs to.

    • name: string

      The name of the webhook.

    Returns Promise<APIWebhook>

  • Delete a webhook from Guilded.

    Example

    webhooks.delete('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the webhook belongs to.

    • webhookId: string

      The ID of the webhook to delete.

    Returns Promise<void>

  • Edit a webhook on Guilded.

    Returns

    The edited webhook.

    Example

    webhooks.edit('abc', 'abc', 'Webhook');
    

    Parameters

    • serverId: string

      The ID of the server the webhook belongs to.

    • webhookId: string

      The ID of the webhook to edit.

    • name: string

      The name of the webhook.

    • Optional channelId: string

      The ID of the channel the webhook belongs to.

    Returns Promise<APIWebhook>

  • Fetch webhooks from Guilded.

    Returns

    The fetched webhooks.

    Example

    webhooks.fetchMany('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the webhooks belong to.

    • channelId: string

      The ID of the channel to fetch webhooks from.

    Returns Promise<APIWebhook[]>

  • Fetch a webhook from Guilded.

    Returns

    The fetched webhook.

    Example

    webhooks.fetchSingle('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the webhook belongs to.

    • webhookId: string

      The ID of the webhook to fetch.

    Returns Promise<APIWebhook>

  • Create a webhook message on Guilded.

    Example

    webhooks.send('abc', 'abc', 'Hello world!');
    

    Parameters

    Returns Promise<void>