fix: actually works on heroku, and few stuff

This commit is contained in:
igna 2021-09-28 09:32:52 +00:00
parent ddc936a891
commit 4e7572053d
4 changed files with 7 additions and 11 deletions

4
.gitignore vendored
View file

@ -3,6 +3,4 @@
spec/ spec/
dist/ dist/
config.json config.json
a.py .env.example
Procfile.windows
# procfile.windows is due to most-likely brken on few things

2
.replit Normal file
View file

@ -0,0 +1,2 @@
language = "python3"
run = "python3 src/main.py"

View file

@ -1,2 +0,0 @@
TOKEN=DiscordBotToken
PREFIX=DiscordBotPrefix

View file

@ -1,12 +1,9 @@
import os import os
import nextcord import nextcord
from nextcord.ext import commands from nextcord.ext import commands
from dotenv import load_dotenv
load_dotenv() PREFIX = os.environ['PREFIX']
TOKEN = os.getenv('TOKEN') intents = nextcord.Intents.default()
PREFIX = os.getenv('PREFIX')
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)
@ -21,4 +18,5 @@ async def on_ready():
async def ping(ctx): async def ping(ctx):
await ctx.reply('Pong!') await ctx.reply('Pong!')
bot.run(TOKEN)
bot.run(os.environ['TOKEN'])