diff options
| -rw-r--r-- | project/botmanager.py | 3 | ||||
| -rw-r--r-- | project/shoutboxapicommunicator.py | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/project/botmanager.py b/project/botmanager.py index 01f9c10..d4db63c 100644 --- a/project/botmanager.py +++ b/project/botmanager.py @@ -27,7 +27,6 @@ class BotManager(object): If not possible, crash gracefully """ TelegramCommunicator.token = token - self.running_message_id = 1 try: logging.info("Creating bot listener with token {}...".format(token)) TelegramCommunicator.spawn_bot(token) @@ -101,11 +100,9 @@ class BotManager(object): message = { "user": user_name, "text": text, - "id": self.running_message_id, "ip": "null", "timestamp": date } - self.running_message_id += 1 ShoutboxCommunicator.send(message) def handle(self, msg): diff --git a/project/shoutboxapicommunicator.py b/project/shoutboxapicommunicator.py index 21e7e8e..7af430e 100644 --- a/project/shoutboxapicommunicator.py +++ b/project/shoutboxapicommunicator.py @@ -48,8 +48,8 @@ class ShoutboxCommunicator(BaseCommunicator): @staticmethod def send(data): """Send a message to the API""" - post_params = "?user={}&text={}&id={}&ip={}×tamp={}&api_token={}".format( - data["user"], data["text"], data["id"], data["ip"], data["timestamp"], + post_params = "?user={}&text={}&ip={}×tamp={}&api_token={}".format( + data["user"], data["text"], data["ip"], data["timestamp"], ShoutboxCommunicator.token ) |
