diff --git a/standalone_command.py b/standalone_command.py index 3c77bcc..def50cb 100644 --- a/standalone_command.py +++ b/standalone_command.py @@ -55,7 +55,7 @@ def command_check(): return flask.make_response('', 404) -@api.route('/api/v1/exec', methods=['GET']) +@api.route('/api/v1/exec_command', methods=['GET']) def exec_command(): if 'command_name' not in request.args: return flask.make_response('{\"text\":"Argument \'command_name\' not in request"}', 400) diff --git a/standalone_twitch_script.py b/standalone_twitch_script.py index a9b8552..bb0f82d 100644 --- a/standalone_twitch_script.py +++ b/standalone_twitch_script.py @@ -76,7 +76,7 @@ class Twitch_Module(): def exec_command(self, realMessage: twitch.chat.Message, command: str, rest: str): # todo need to url-escape command and rest params = urlencode({'command_source': commands.command_base.AbstractCommand.CommandSource.Twitch,'user_name': realMessage.sender, 'command_name': command, 'rest': rest, 'bonus_data': realMessage}) - url = "http://standalone_command:6009/api/v1/exec?%s" % params + url = "http://standalone_command:6009/api/v1/exec_command?%s" % params resp = requests.get(url) if resp.status_code == 200: print("Got the following message: %s" % resp.text)