""" Rocketbot Discord bot. Relies on a configured config.py (copy config.sample.py for a template). Author: Ian Albert (@rocketsoup) Date: 2021-11-11 """ import asyncio from config import CONFIG from rocketbot.bot import start_bot from rocketbot.utils import bot_log CURRENT_CONFIG_VERSION = 3 if (CONFIG.get('__config_version') or 0) < CURRENT_CONFIG_VERSION: # If you're getting this error, it means something changed in config.py's # format. Consult config.sample.py and compare it to your own config.py. # Rename/move any values as needed. When satisfied, update "__config_version" # to the value in config.sample.py. ...I know, pretty janky migration process. raise RuntimeError('config.py format may be outdated. Review ' + 'config.sample.py, update the "__config_version" field to ' + f'{CURRENT_CONFIG_VERSION}, and try again.') try: asyncio.run(start_bot()) except KeyboardInterrupt: bot_log(None, None, 'Stopping bot due to Ctrl+C key')