mirror of
https://github.com/uhIgnacio/heroku-example.git
synced 2024-08-14 22:47:00 +00:00
Update main.py
This commit is contained in:
parent
46201b1ecf
commit
9f7d908a12
1 changed files with 8 additions and 4 deletions
12
src/main.py
12
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!')
|
||||
|
|
Loading…
Reference in a new issue