From 1277e1c17bc92bfd5908856747bfd5f46b84f4a5 Mon Sep 17 00:00:00 2001 From: Daniel afx Date: Thu, 24 Mar 2022 01:45:22 +0200 Subject: [PATCH] use env variables --- .env.dist | 1 + main.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.env.dist b/.env.dist index ab7d4d5..0e2ace9 100644 --- a/.env.dist +++ b/.env.dist @@ -1,3 +1,4 @@ +version=0.1 token=OT.. channel=0 name=radiobot diff --git a/main.py b/main.py index e6b6e79..ce2a993 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,9 @@ +import os import discord from discord.ext.commands import Bot -bot_version = "0.1" +bot_version = os.environ['version'] +bot_token = os.environ['token'] client = Bot(command_prefix="!") isPlaying = False @@ -32,4 +34,4 @@ class MyClient(discord.Client): await self.voiceChannel.disconnect() client = MyClient() -client.run('') # Get token for this shit \ No newline at end of file +client.run(bot_token) # Get token for this shit \ No newline at end of file