Files
igncore/core/chat_blob.py
T
Minidodo c04f76c0db Added the option to !opt-in/opt-out [onlinebot only]
Fixed command & event threading
Events are now threaded by event_type (i.e. all buddy_logon events get ran in the same one)
Added default preferences
Fixed recipe loading for multiple installs (i.e. on different machines)
2021-08-27 13:58:47 +02:00

20 lines
612 B
Python

class ChatBlob:
def __init__(self, title, msg, prefix="", suffix=""):
self.title = title
self.msg = msg.strip("\n")
self.page_prefix = prefix
self.page_postfix = suffix
def __str__(self):
return f"ChatBlob('{self.title}', '{self.msg}')"
def __repr__(self):
return self.__str__()
def __eq__(self, obj):
return isinstance(obj, ChatBlob) and \
obj.title == self.title and \
obj.msg == self.msg and \
obj.page_prefix == self.page_prefix and \
obj.page_postfix == self.page_postfix