forked from IHaveNoFunnyName/Neffytron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
29 lines (23 loc) · 830 Bytes
/
main.py
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
28
29
import os
from dotenv import load_dotenv
import discord
from discord.ext import commands
# Do I have to do this? Is there a way to like have python default import a .py? maybe that's what __init__.py is for?
# I don't understand how this wasn't immediately answered via google.
from settings.settings import Settings
from lobby.lobby import Lobby
def run(token):
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
@bot.event
async def on_ready():
print(f"Logged in as {bot.user}\nSetting up cogs")
await bot.add_cog(Settings(bot))
await bot.add_cog(Lobby(bot))
print('Set up cogs')
bot.run(token)
if __name__ == "__main__":
load_dotenv()
run(os.getenv('TOKEN'))