diff --git a/Procfile b/Procfile index c445cb1..de7e435 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -worker: python3 main.py \ No newline at end of file +worker: python3 src/main.py diff --git a/src/main.py b/src/main.py index 986e2c0..9dea847 100644 --- a/src/main.py +++ b/src/main.py @@ -1,18 +1,22 @@ -import os +import os import nextcord from nextcord.ext import commands +from dotenv import load_dotenv -TOKEN = os.environ['TOKEN'] -PREFIX = os.environ['PREFIX'] +load_dotenv() +TOKEN = os.getenv('TOKEN') +PREFIX = os.getenv('PREFIX') intents = nextcord.Intents.default() intents.members = True bot = commands.Bot(command_prefix=PREFIX, intents=intents) -@bot.event() + +@bot.event async def on_ready(): print(f'{bot.user} is online!') + @bot.command() async def ping(ctx): await ctx.reply('Pong!')