diff --git a/SMSHandler.py b/SMSHandler.py index e2bdde4..ee02042 100644 --- a/SMSHandler.py +++ b/SMSHandler.py @@ -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) \ No newline at end of file + 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) diff --git a/main.py b/main.py index 7b9b3d4..da4226d 100644 --- a/main.py +++ b/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) diff --git a/requirements.txt b/requirements.txt index ff521a5..ca79c3f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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