diff --git a/Bot.py b/Bot.py index b65f7d5..53efae9 100644 --- a/Bot.py +++ b/Bot.py @@ -6,15 +6,21 @@ import configparser from discord.ext import commands -bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Hourglass, bot that does timers', pm_help=True) +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.add_cog(Timer.Timer(bot)) @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"])