flexget.components.notify.notifiers.discord module#

class flexget.components.notify.notifiers.discord.DiscordNotifier[source]#

Bases: object

Send notification to Discord.

Example:

notify:
  entries:
    via:
      - discord:
          web_hook_url: <string>
          [silent: <boolean>] (suppress notification)
          [username: <string>] (override the default username of the webhook)
          [avatar_url: <string>] (override the default avatar of the webhook)
          [embeds: <arrays>[<object>]] (override embeds)
notify(title, message, config)[source]#

Send discord notification.

Parameters:
  • message (str) – message body

  • config (dict) – discord plugin config

schema = {'additionalProperties': False, 'properties': {'avatar_url': {'format': 'uri', 'type': 'string'}, 'embeds': {'items': {'additionalProperties': False, 'properties': {'author': {'additionalProperties': False, 'properties': {'icon_url': {'format': 'uri', 'type': 'string'}, 'name': {'type': 'string'}, 'proxy_icon_url': {'format': 'uri', 'type': 'string'}, 'url': {'format': 'uri', 'type': 'string'}}, 'type': 'object'}, 'color': {'oneOf': [{'type': 'integer'}, {'type': 'string'}]}, 'description': {'type': 'string'}, 'fields': {'items': {'additionalProperties': False, 'properties': {'inline': {'type': 'boolean'}, 'name': {'type': 'string'}, 'value': {'type': 'string'}}, 'required': ['name', 'value'], 'type': 'object'}, 'minItems': 1, 'type': 'array'}, 'footer': {'additionalProperties': False, 'properties': {'icon_url': {'format': 'uri', 'type': 'string'}, 'proxy_icon_url': {'format': 'uri', 'type': 'string'}, 'text': {'type': 'string'}}, 'required': ['text'], 'type': 'object'}, 'image': {'additionalProperties': False, 'properties': {'proxy_url': {'format': 'uri', 'type': 'string'}, 'url': {'format': 'uri', 'type': 'string'}}, 'type': 'object'}, 'provider': {'additionalProperties': False, 'properties': {'name': {'type': 'string'}, 'url': {'format': 'uri', 'type': 'string'}}, 'type': 'object'}, 'thumbnail': {'additionalProperties': False, 'properties': {'proxy_url': {'format': 'uri', 'type': 'string'}, 'url': {'format': 'uri', 'type': 'string'}}, 'type': 'object'}, 'timestamp': {'type': 'string'}, 'title': {'type': 'string'}, 'url': {'format': 'uri', 'type': 'string'}}, 'type': 'object'}, 'type': 'array'}, 'silent': {'default': False, 'type': 'boolean'}, 'username': {'default': 'Flexget', 'type': 'string'}, 'web_hook_url': {'format': 'uri', 'type': 'string'}}, 'required': ['web_hook_url'], 'type': 'object'}#
flexget.components.notify.notifiers.discord.register_plugin()[source]#