airflow.providers.discord.notifications.discord

Module Contents

Classes

DiscordNotifier

Discord BaseNotifier.

Attributes

ICON_URL

airflow.providers.discord.notifications.discord.ICON_URL: str = 'https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/pin_100.png'[source]
class airflow.providers.discord.notifications.discord.DiscordNotifier(discord_conn_id='discord_webhook_default', text='This is a default message', username='Airflow', avatar_url=ICON_URL, tts=False)[source]

Bases: airflow.notifications.basenotifier.BaseNotifier

Discord BaseNotifier.

Parameters
  • discord_conn_id (str) – Http connection ID with host as “https://discord.com/api/” and default webhook endpoint in the extra field in the form of {“webhook_endpoint”: “webhooks/{webhook.id}/{webhook.token}”}

  • text (str) – The content of the message

  • username (str) – The username to send the message as. Optional

  • avatar_url (str) – The URL of the avatar to use for the message. Optional

  • tts (bool) – Text to speech.

template_fields = ('discord_conn_id', 'text', 'username', 'avatar_url', 'tts')[source]
hook()[source]

Discord Webhook Hook.

notify(context)[source]

Send a message to a Discord channel.

Was this entry helpful?