mbot/main.py
2024-06-06 13:59:53 -04:00

22 lines
464 B
Python

"""Matrix Bot Framework"""
import asyncio
import json
from matrix import MatrixBot
def load_config(path: str) -> dict:
with open(path, 'r', encoding='utf-8') as f:
return json.loads(f.read())
async def main():
config = load_config("config.json")
bot = MatrixBot(config['matrix'])
await bot.send_message("beep boop, i'm a bot")
await bot.logout()
if __name__ == '__main__':
asyncio.get_event_loop().run_until_complete(main())