v2 Standalone Docker Update #40
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user