heroku-example/src/main.py

21 lines
394 B
Python
Raw Normal View History

2021-08-29 17:55:45 +00:00
import os
import nextcord
2021-08-29 17:45:55 +00:00
from nextcord.ext import commands
TOKEN = os.environ['TOKEN']
PREFIX = os.environ['PREFIX']
intents = nextcord.Intents.default()
intents.members = True
2021-08-29 17:55:45 +00:00
bot = commands.Bot(command_prefix=PREFIX, intents=intents)
2021-08-29 17:45:55 +00:00
@bot.event()
async def on_ready():
print(f'{bot.user} is online!')
@bot.command()
async def ping(ctx):
await ctx.reply('Pong!')
2021-08-29 17:55:45 +00:00
bot.run(TOKEN)