matrix-applicationbot/src/matrix_applicationbot/main.py
Kumi 97cd4aeb2f
feat: rename and extend bot for application handling
Renamed the bot from "SupportBot" to "ApplicationBot" to reflect expanded functionality including room application management. Updated README to specify the fork's purpose and extended the bot with features like automated ticket creation for new members, application processing, and command handling for room monitoring and user access management. This enhances the bot's use case by supporting room access applications alongside support tickets.
2024-11-08 07:52:09 +01:00

23 lines
No EOL
540 B
Python

import yaml
import logging
import asyncio
from .classes.bot import ApplicationBot
def load_config(config_file):
with open(config_file, 'r') as file:
return yaml.safe_load(file)
def main():
config = load_config("config.yaml")
bot = ApplicationBot(config)
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("nio").setLevel(logging.WARNING)
asyncio.get_event_loop().run_until_complete(bot.login())
asyncio.get_event_loop().run_until_complete(bot.start())
if __name__ == "__main__":
main()