From 9f7d908a1236058b60e2c81ac7b75eae05910f65 Mon Sep 17 00:00:00 2001 From: igna <88955484+nekospara@users.noreply.github.com> Date: Tue, 31 Aug 2021 01:50:30 -0400 Subject: [PATCH] Update main.py --- src/main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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!')