From 4e7572053d33a48a802f4905ccca824f787d9b37 Mon Sep 17 00:00:00 2001 From: igna <88955484+uhIgnacio@users.noreply.github.com> Date: Tue, 28 Sep 2021 09:32:52 +0000 Subject: [PATCH] fix: actually works on heroku, and few stuff --- .gitignore | 4 +--- .replit | 2 ++ src/.env.example | 2 -- src/main.py | 10 ++++------ 4 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 .replit diff --git a/.gitignore b/.gitignore index 9450a20..5612fa5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,4 @@ spec/ dist/ config.json -a.py -Procfile.windows -# procfile.windows is due to most-likely brken on few things \ No newline at end of file +.env.example \ No newline at end of file diff --git a/.replit b/.replit new file mode 100644 index 0000000..f795517 --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language = "python3" +run = "python3 src/main.py" \ No newline at end of file diff --git a/src/.env.example b/src/.env.example index 848de6e..e69de29 100644 --- a/src/.env.example +++ b/src/.env.example @@ -1,2 +0,0 @@ -TOKEN=DiscordBotToken -PREFIX=DiscordBotPrefix \ No newline at end of file diff --git a/src/main.py b/src/main.py index 9dea847..0cfec44 100644 --- a/src/main.py +++ b/src/main.py @@ -1,12 +1,9 @@ import os import nextcord from nextcord.ext import commands -from dotenv import load_dotenv -load_dotenv() -TOKEN = os.getenv('TOKEN') -PREFIX = os.getenv('PREFIX') -intents = nextcord.Intents.default() +PREFIX = os.environ['PREFIX'] +intents = nextcord.Intents.default() intents.members = True bot = commands.Bot(command_prefix=PREFIX, intents=intents) @@ -21,4 +18,5 @@ async def on_ready(): async def ping(ctx): await ctx.reply('Pong!') -bot.run(TOKEN) + +bot.run(os.environ['TOKEN'])