This commit is contained in:
DomNomNom 2025-02-15 22:47:46 +13:00
parent bc31deec88
commit 42c6f9beee

View File

@ -28,26 +28,10 @@ async def message_callback(room: MatrixRoom, event: RoomMessageText) -> None:
async def main() -> None:
# async with aiofiles.open(CONFIG_FILE) as f:
# contents = await f.read()
# config = json.loads(contents)
# client = AsyncClient(config["homeserver"])
# client.access_token = config["access_token"]
# client.user_id = config["user_id"]
# client.device_id = config["device_id"]
# room_id = "!sZpfYzLsRbnIOKJlPH:matrix.domnomnom.com"
# image = "/home/get/getbot_profile_pic_256.png"
# # await send_image(client, room_id, image)
# if client.should_upload_keys:
# await client.keys_upload()
client = await login()
client: AsyncClient = await login()
client.add_event_callback(message_callback, RoomMessageText)
await client.sync_forever(timeout=30000) # milliseconds