heroku-example/src/main.py

23 lines
381 B
Python
Raw Normal View History

2021-08-31 05:50:30 +00:00
import os
2021-08-29 17:55:45 +00:00
import nextcord
2021-08-29 17:45:55 +00:00
from nextcord.ext import commands
PREFIX = os.environ['PREFIX']
intents = nextcord.Intents.default()
2021-08-29 17:45:55 +00:00
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
2021-08-31 05:50:30 +00:00
@bot.event
2021-08-29 17:45:55 +00:00
async def on_ready():
print(f'{bot.user} is online!')
2021-08-31 05:50:30 +00:00
2021-08-29 17:45:55 +00:00
@bot.command()
async def ping(ctx):
await ctx.reply('Pong!')
bot.run(os.environ['TOKEN'])