TotalFreedomBot/main.py

32 lines
889 B
Python
Raw Normal View History

2020-10-28 11:47:39 +00:00
import discord
import os
import time
2020-10-28 12:23:49 +00:00
from datetime import datetime
2020-10-28 11:47:39 +00:00
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
botToken = os.getenv('botToken')
intents = discord.Intents.all()
bot = commands.Bot(command_prefix=os.getenv('prefix'), description='TotalFreedom bot help command', intents=intents)
extensions = [
2020-10-28 12:23:49 +00:00
"commands.moderation",
"commands.server_commands",
2020-10-28 11:47:39 +00:00
"commands.help",
2020-10-28 12:23:49 +00:00
"commands.miscellaneous",
"events"
2020-10-28 11:47:39 +00:00
]
if __name__ == '__main__':
for extension in extensions:
try:
bot.load_extension(extension)
2020-10-31 02:04:55 +00:00
print(f"[{str(datetime.utcnow().replace(microsecond=0))[11:]} INFO]: [Extensions] {extension} loaded successfully")
2020-10-28 11:47:39 +00:00
except Exception as e:
2020-10-31 02:04:55 +00:00
print(f"[{str(datetime.utcnow().replace(microsecond=0))[11:]} INFO]: [Extensions] {extension} didn't load {e}")
2020-10-28 11:47:39 +00:00
2020-10-28 12:23:49 +00:00
bot.run(botToken)