21 lines
493 B
Python
21 lines
493 B
Python
import asyncio
|
|
import discord
|
|
import Timer
|
|
import importlib
|
|
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)
|
|
|
|
#Read configuration file:
|
|
config = configparser.ConfigParser()
|
|
config.read('settings.ini')
|
|
bot.add_cog(Timer.Timer(bot))
|
|
|
|
@bot.event
|
|
async def on_ready():
|
|
print('Logged in as:\n{0} (ID: {0.id})'.format(bot.user))
|
|
|
|
bot.run(config["tokens"]["bot"])
|