mirror of
https://github.com/uhIgnacio/heroku-example.git
synced 2024-08-14 22:47:00 +00:00
fix: actually works on heroku, and few stuff
This commit is contained in:
parent
ddc936a891
commit
4e7572053d
4 changed files with 7 additions and 11 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -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
2
.replit
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
language = "python3"
|
||||||
|
run = "python3 src/main.py"
|
|
@ -1,2 +0,0 @@
|
||||||
TOKEN=DiscordBotToken
|
|
||||||
PREFIX=DiscordBotPrefix
|
|
10
src/main.py
10
src/main.py
|
@ -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'])
|
||||||
|
|
Loading…
Reference in a new issue