Function sendDiscord

  • Sends a message to a Discord channel using a webhook.

    Parameters

    • content: string

      The content of the message to be sent.

    • options: DiscordOptions = ...

      Configuration options for sending the message.

    Returns Promise<boolean>

    A promise that resolves to true if the message was sent successfully, or false otherwise.

    Example

    sendDiscord('Hello from Skeet Notifier', {
    webhookUrl: 'YOUR_DISCORD_WEBHOOK_URL',
    username: 'CustomUsername'
    });

    // Or you can set the webhook url in .env
    process.env.DISCORD_WEBHOOK_URL = 'your webhook url'
    sendDiscord('Hello from Skeet Notifier')

    options overrides process.env.DISCORD_WEBHOOK_URL

Generated using TypeDoc