import tomllib import bot with open("config.toml", "rb") as f: config = tomllib.load(f) bot = bot.Bot( prefix = config['prefix'], token = config['token'], owner_id = config['owner_id'], lastfm_api_key = config['api_key'], lastfm_api_secret = config['api_secret'] ) bot.load_commands("commands") @bot.listen("on_ready") async def on_ready(params): print(f"Logged in as {bot.account.username}") await bot.init_db() bot.run(restart_always = True)