-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
27 lines (18 loc) · 728 Bytes
/
bot.py
File metadata and controls
27 lines (18 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from os import getenv
from dotenv import load_dotenv
from discord.ext import commands
from game_selector import GameSelector
from help_command import AtlasBotHelp
class AtlasBot(commands.Bot):
def __init__(self, command_prefix, help_command: commands.HelpCommand = AtlasBotHelp(), description=None, **options):
super().__init__(command_prefix, help_command=help_command, description=description, **options)
self.add_cog(GameSelector(self))
async def on_ready(self):
print(f"Connected to {self.guilds[0]} as {self.user.name}")
def main():
load_dotenv()
TOKEN = getenv('DISCORD_TOKEN')
bot = AtlasBot(command_prefix="!")
bot.run(TOKEN)
if __name__ == "__main__":
main()