lphillips / SecretHitlerDiscord

A discord bot for the famous board game Secret Hitler
Other
1 stars 0 forks source link

Reference bot token via env var instead of literal #8

Closed lphillips closed 3 years ago

lphillips commented 3 years ago

Currently, the bot's token is embedded as a literal in the call to Discord.client.run(), which will make version control annoying since the token shouldn't be committed to the repo. A better solution is to export an environment variable with the token string and reference that var from the code instead.

There's a good example of how to set this up here: https://realpython.com/how-to-make-a-discord-bot-python/#creating-a-discord-connection