diff --git a/.gitignore b/.gitignore index 5612fa5..9450a20 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ spec/ dist/ config.json -.env.example \ No newline at end of file +a.py +Procfile.windows +# procfile.windows is due to most-likely brken on few things \ No newline at end of file diff --git a/.replit b/.replit deleted file mode 100644 index f795517..0000000 --- a/.replit +++ /dev/null @@ -1,2 +0,0 @@ -language = "python3" -run = "python3 src/main.py" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index c1f996d..30da507 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ nextcord +python-dotenv diff --git a/src/.env.example b/src/.env.example index 1851b27..848de6e 100644 --- a/src/.env.example +++ b/src/.env.example @@ -1,2 +1,2 @@ -TOKEN= -PREFIX= \ No newline at end of file +TOKEN=DiscordBotToken +PREFIX=DiscordBotPrefix \ No newline at end of file diff --git a/src/main.py b/src/main.py index 0cfec44..9dea847 100644 --- a/src/main.py +++ b/src/main.py @@ -1,9 +1,12 @@ import os import nextcord from nextcord.ext import commands +from dotenv import load_dotenv -PREFIX = os.environ['PREFIX'] -intents = nextcord.Intents.default() +load_dotenv() +TOKEN = os.getenv('TOKEN') +PREFIX = os.getenv('PREFIX') +intents = nextcord.Intents.default() intents.members = True bot = commands.Bot(command_prefix=PREFIX, intents=intents) @@ -18,5 +21,4 @@ async def on_ready(): async def ping(ctx): await ctx.reply('Pong!') - -bot.run(os.environ['TOKEN']) +bot.run(TOKEN)