import asyncio import discord import Timer import importlib import configparser from discord.ext import commands async def add_cogs(bot): await bot.add_cog(Timer.Timer(bot)) intents = discord.Intents.default() intents.message_content = True bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Hourglass, bot that does timers', intents=intents, pm_help=True) #Read configuration file: config = configparser.ConfigParser() config.read('settings.ini') @bot.event async def on_ready(): await add_cogs(bot) print('Logged in as:\n{0} (ID: {0.id})'.format(bot.user)) bot.run(config["tokens"]["bot"])