generated from anoadragon453/nio-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
message_responses.py
32 lines (22 loc) · 905 Bytes
/
message_responses.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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