Removing the production token from the code and rotating it

This commit is contained in:
luke 2018-06-28 22:15:55 -07:00
parent c02a7e127f
commit 6d5837b382
2 changed files with 3 additions and 7 deletions

View File

@ -29,13 +29,9 @@ import weather
# Client object
client = discord.Client()
tokens = {
'test': 'MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU',
'prod': 'MzkxNzgxMzAxNDE5NjM4Nzg0.DbGAqg.z29jiet7iKBBznb5GCqlxJTzNfY'
}
debug = dragon_environment == 'test'
dragon_environment = os.getenv('DRAGON_ENV')
debug = dragon_environment == 'test'
@client.event
async def on_ready():
# Update the bot's status
@ -467,4 +463,4 @@ async def on_message(message):
)
client.run(tokens[dragon_environment])
client.run(os.getenv('token'))

View File

@ -7,4 +7,4 @@ printf "\n[-] Running dragon bot in test mode\n"
docker build -f ./Dockerfile-test-env -t dragon-bot-test . || exit
# Run that shit and mount the docker socket so it can talk to the sky-factory container
docker run -ti --rm --name dragon-bot-test -e DRAGON_ENV=test -v /var/run/docker.sock:/var/run/docker.sock dragon-bot-test sh
docker run -ti --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU" -v /var/run/docker.sock:/var/run/docker.sock dragon-bot-test sh