| Total Complexity | 1 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | __version__ = "1.2.0" |
||
| 2 | __author__ = "vinay dawani" |
||
| 3 | |||
| 4 | import os |
||
| 5 | import discord |
||
| 6 | import asyncio |
||
| 7 | import requests |
||
| 8 | import yaml |
||
| 9 | from discord.ext import commands |
||
| 10 | from dotenv import load_dotenv |
||
| 11 | from utils.colors import colors |
||
| 12 | |||
| 13 | load_dotenv() |
||
| 14 | TOKEN = os.getenv("DISCORD_TOKEN") |
||
| 15 | GUILD = os.getenv("DISCORD_GUILD") |
||
| 16 | ID = os.getenv("CLIENT_ID") |
||
| 17 | SECRET = os.getenv("SECRET") |
||
| 18 | |||
| 19 | bot = commands.Bot( |
||
| 20 | command_prefix=commands.when_mentioned_or("isa!", "i!", "!!"), |
||
| 21 | description="I'm here to just help keep things running smoothly", |
||
| 22 | ) |
||
| 23 | |||
| 24 | with open("config.yaml") as x: |
||
| 25 | bot.config = yaml.safe_load(x) |
||
| 26 | |||
| 27 | for filename in os.listdir("./cogs"): |
||
| 28 | if filename.endswith(".py") and not filename.startswith("_"): |
||
| 29 | bot.load_extension(f"cogs.{filename[:-3]}") |
||
| 30 | |||
| 31 | bot.color_list = [c for c in colors.values()] |
||
| 32 | bot.version = __version__ |
||
| 33 | |||
| 34 | # TODO: make a separate file for isa related queries |
||
| 35 | @bot.command(name="events") |
||
| 36 | async def events(ctx): |
||
| 37 | response = "We don't have any upcoming events right now.\nCheck back later! \U0001F6A8" |
||
| 38 | await ctx.send(response) |
||
| 39 | |||
| 40 | |||
| 41 | bot.run(TOKEN) |
||
| 42 |