Messages

Ibis Birdbrain communicates with the user, itself, and (eventually) other bots through Messages. A Message is a simple wrapper around text with metadata and optional Attachments.

Usage

from ibis_birdbrain.messages import Message, Messages, Email

m1 = Message("Hello, world!")
m1
Message(5956d627-9038-4bb4-b827-1d9ed646c75e)

Emails

Currently, the only implementation of Message that is viewable as a proper string is Email.

e1 = Email("Hello")
e2 = Email(", world!")

messages = Messages([e1, e2])
messages
To: 
From: 
Subject: 
Sent at: 2024-03-05 11:22:52.258182
Message: e855820a-eedd-4229-96d1-7ae525800995

Hello

Attachments:


---
To: 
From: 
Subject: 
Sent at: 2024-03-05 11:22:52.258207
Message: 50a43477-12d3-4138-b5ff-38fd5b2b7704

, world!

Attachments:
Back to top