diff --git a/src/boeh/__init__.py b/src/boeh/__init__.py index 82f2709..bc4711d 100644 --- a/src/boeh/__init__.py +++ b/src/boeh/__init__.py @@ -1,7 +1,18 @@ from nio import AsyncClient, RoomMessageText - +import random class BooeehBot: + + def generate_boeh(self): + boeh = "b" + for _ in range(random.randint(1, 10)): + boeh += "o" + for _ in range(random.randint(1, 5)): + boeh += "e" + for _ in range(random.randint(1, 3)): + boeh += "e" + return boeh + def __init__(self, url, username, password): self.url = url self.username = username @@ -11,7 +22,7 @@ class BooeehBot: async def login(self): try: response = await self.client.login(self.password) - print(f"User logged in: {self.username}") + print(f"Logged in. Serving {self.username}.") return response except Exception as e: print(f"Login error: {e}") @@ -22,7 +33,7 @@ class BooeehBot: if isinstance(event, RoomMessageText): if event.sender == specific_user_id: - response_text = "booeeeh" + response_text = self.generate_boeh() try: await self.client.room_send( room.room_id,