diff options
author | redcreeper14385 <mounderfod@gmail.com> | 2021-07-21 15:58:30 +0100 |
---|---|---|
committer | redcreeper14385 <mounderfod@gmail.com> | 2021-07-21 15:58:30 +0100 |
commit | da46644c61a99ee288a0c78369fe7afeec43f3ba (patch) | |
tree | ad4acc426e6d901857a3c91c78290eae5201f9c1 /bot.py | |
download | tiny-potato-bot-da46644c61a99ee288a0c78369fe7afeec43f3ba.tar.gz |
feat: initial commit, about and fun commands
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bot.py b/bot.py new file mode 100644 index 0000000..f07c4bb --- /dev/null +++ b/bot.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +import os +from dotenv import load_dotenv +import utils + +load_dotenv() +bot = commands.Bot(command_prefix="t!", activity=discord.Activity(name="for commands", type=discord.ActivityType.watching)) +bot.help_command = utils.MyHelpCommand(command_attrs={'hidden':True}) + +@bot.event +async def on_ready(): + print(f'Logged in as {bot.user.display_name}!') + +@bot.event +async def on_command_error(ctx, error): + await utils.parse_error(ctx, error) + +def load_extensions(bot): + extensions = ['cogs.fun', 'cogs.about'] + if __name__ == '__main__': + for i in extensions: + bot.load_extension(i) + +load_extensions(bot) +bot.run(os.getenv("TOKEN")) \ No newline at end of file |