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-28 12:23:49 +00:00
|
|
|
print(f"[{datetime.utcnow().replace(microsecond=0)} INFO]: [Extensions] {extension} loaded successfully")
|
2020-10-28 11:47:39 +00:00
|
|
|
except Exception as e:
|
2020-10-28 12:23:49 +00:00
|
|
|
print("[{} INFO]: [Extensions] {} didn't load {}".format(datetime.utcnow().replace(microsecond=0), extension, e))
|
2020-10-28 11:47:39 +00:00
|
|
|
|
2020-10-28 12:23:49 +00:00
|
|
|
bot.run(botToken)
|