Update main.py

This commit is contained in:
igna 2021-08-31 01:50:30 -04:00 committed by GitHub
parent 46201b1ecf
commit 9f7d908a12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,22 @@
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!')