General Messages to Slack¶
bibtutils.slack.message¶
Enables sending messages to Slack.
- bibtutils.slack.message.send_message(webhook, title, text=None, color=None, blocks=None, dividers=False)[source]¶
Sends a message to Slack.
from bibtutils.slack.message import send_message ...
- Parameters:
webhook (
str
) – a slack webhook in the standard format:'https://hooks.slack.com/services/{app_id}/{channel_id}/{hash}'
title (
str
) – the title of the message. This will appear above the attachment. Can be Slack-compatible markdown.text (
str
) – the text to be included in the attachment. Can be Slack-compatible markdown.blocks (
list
) – A list of strings, each to be put in its own attachment block.dividers (
bool
) – When generating multiple blocks, whether or not to include dividers between them.color (
str
) – the color to use for the Slack attachment border.