Use environement variables for tokens
This commit is contained in:
parent
29b80d761b
commit
ed49ab9eb1
@ -1,9 +1,12 @@
|
||||
import logging
|
||||
import urllib
|
||||
|
||||
import config_sms
|
||||
import os
|
||||
|
||||
|
||||
class SMSHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
msg = urllib.parse.quote(self.format(record).encode('utf8'))
|
||||
urllib.request.urlopen("https://smsapi.free-mobile.fr/sendmsg?user=" + config_sms.user + "&pass=" + config_sms.password + "&msg=" + msg)
|
||||
urllib.request.urlopen("https://smsapi.free-mobile.fr/sendmsg?user=" +
|
||||
os.environ.get("FREE_SMS_USER", "") + "&pass=" +
|
||||
os.environ.get("FREE_SMS_PASS", "") + "&msg=" + msg)
|
||||
|
2
main.py
2
main.py
@ -199,4 +199,4 @@ class FoBot(discord.Client):
|
||||
|
||||
|
||||
myBot = FoBot()
|
||||
myBot.run("", max_messages=100000000)
|
||||
myBot.run(os.environ.get("DISCORD_TOKEN", ""), max_messages=100000000)
|
||||
|
@ -3,7 +3,7 @@ async-timeout==3.0.0
|
||||
attrs==18.1.0
|
||||
cffi==1.11.5
|
||||
chardet==3.0.4
|
||||
git+https://github.com/Rapptz/discord.py@rewrite#egg=package-two
|
||||
git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py
|
||||
idna==2.7
|
||||
multidict==4.3.1
|
||||
pycparser==2.18
|
||||
|
Loading…
Reference in New Issue
Block a user