fix(bot.py): correct indentation of send_message method

Fixed the indentation of the send_message method within the RoombaBot class. The incorrect indentation caused the method to be misaligned, possibly resulting in an AttributeError. This ensures the method is properly defined and callable within the class.
This commit is contained in:
Kumi 2024-08-09 11:13:08 +02:00
parent eadc4d7791
commit 519adeb16e
Signed by: kumi
GPG key ID: ECBCC9082395383F

22
bot.py
View file

@ -139,18 +139,18 @@ class RoombaBot:
local_users.append(user_id)
return local_users
async def send_message(self, room_id, message):
"""Send a message to a room.
async def send_message(self, room_id, message):
"""Send a message to a room.
Args:
room_id (str): The room ID to send the message to.
message (str): The message to send.
"""
content = {"msgtype": "m.text", "body": message}
self.logger.debug(f"Sending message to {room_id}: {message}")
await self.client.room_send(
room_id, message_type="m.room.message", content=content
)
Args:
room_id (str): The room ID to send the message to.
message (str): The message to send.
"""
content = {"msgtype": "m.text", "body": message}
self.logger.debug(f"Sending message to {room_id}: {message}")
await self.client.room_send(
room_id, message_type="m.room.message", content=content
)
async def main():