Removing the production token from the code and rotating it
This commit is contained in:
parent
c02a7e127f
commit
6d5837b382
@ -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'))
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user