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
10
src/main.py
10
src/main.py
|
@ -1,18 +1,22 @@
|
||||||
import os
|
import os
|
||||||
import nextcord
|
import nextcord
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
TOKEN = os.environ['TOKEN']
|
load_dotenv()
|
||||||
PREFIX = os.environ['PREFIX']
|
TOKEN = os.getenv('TOKEN')
|
||||||
|
PREFIX = os.getenv('PREFIX')
|
||||||
intents = nextcord.Intents.default()
|
intents = nextcord.Intents.default()
|
||||||
intents.members = True
|
intents.members = True
|
||||||
|
|
||||||
bot = commands.Bot(command_prefix=PREFIX, intents=intents)
|
bot = commands.Bot(command_prefix=PREFIX, intents=intents)
|
||||||
|
|
||||||
@bot.event()
|
|
||||||
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print(f'{bot.user} is online!')
|
print(f'{bot.user} is online!')
|
||||||
|
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def ping(ctx):
|
async def ping(ctx):
|
||||||
await ctx.reply('Pong!')
|
await ctx.reply('Pong!')
|
||||||
|
|
Loading…
Reference in a new issue