33 lines
906 B
Python
33 lines
906 B
Python
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class Message(object):
|
|
|
|
def __init__(self, client, store, config, message_content, room, event):
|
|
"""Initialize a new Message
|
|
|
|
Args:
|
|
client (nio.AsyncClient): nio client used to interact with matrix
|
|
|
|
store (Storage): Bot storage
|
|
|
|
config (Config): Bot configuration parameters
|
|
|
|
message_content (str): The body of the message
|
|
|
|
room (nio.rooms.MatrixRoom): The room the event came from
|
|
|
|
event (nio.events.room_events.RoomMessageText): The event defining the message
|
|
"""
|
|
self.client = client
|
|
self.store = store
|
|
self.config = config
|
|
self.message_content = message_content
|
|
self.room = room
|
|
self.event = event
|
|
|
|
async def process(self):
|
|
"""Process and possibly respond to the message"""
|
|
pass
|