2021-10-03 03:00:42 +02:00
|
|
|
"""
|
|
|
|
Not really tests, because I don't know how to testt without a whole matrix server.
|
|
|
|
"""
|
|
|
|
|
2021-10-03 16:36:36 +02:00
|
|
|
import asyncio
|
2021-10-03 03:00:42 +02:00
|
|
|
import os
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
from matrix_bot.client import Client
|
|
|
|
from getpass import getpass
|
|
|
|
|
2021-10-03 16:36:36 +02:00
|
|
|
async def main():
|
2021-10-03 03:00:42 +02:00
|
|
|
load_dotenv()
|
2021-10-03 16:36:36 +02:00
|
|
|
client = await Client(
|
2021-10-03 03:00:42 +02:00
|
|
|
os.environ["MUSER"],
|
|
|
|
os.environ["HOMESERVER"],
|
|
|
|
os.environ["PASSWD"],
|
|
|
|
os.environ["ROOMS"].split(",")
|
|
|
|
)
|
2021-10-03 16:36:36 +02:00
|
|
|
await client.run()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
asyncio.run(main())
|
2021-10-03 03:00:42 +02:00
|
|
|
|