This class contains helper functions for sending notifications with the most popular messaging services.

  • Slack
  • Telegram (TODO)
  • Discord (TODO)
  • Email (TODO)
  • SMS (TODO)

Hierarchy

  • default

Constructors

  • Creates a new instance of the Notifications class

    Parameters

    • systemConfig: {}

      Contains the concatinated configuration from the config.yml and strategy.yml files

      Returns default

    Properties

    defaultChannel: string

    Default channel to send messages to

    defaultIcon: string

    Default icon to send messages as

    defaultUsername: string

    Default username to send messages as

    systemConfig: any

    Contains the concatinated configuration from the config.yml and strategy.yml files

    Methods

    • Posts a message to Slack

      Parameters

      • message: string

        The message to send

      • fields: {} = {}

        The fields to send

        • channel: string = ...

          The channel to send the message to

        • username: string = ...

          The username to send the message as

        • icon: string = ...

          The icon to send the message as

        Returns Promise<void>

      • Sets the default channel, username and icon for Slack messages

        Parameters

        • channel: string

          The default channel to send messages to

        • username: string

          The default username to send messages as

        • icon: string

          The default icon to send messages as

        Returns void