channel rewards service #34

Merged
alex_orid merged 13 commits from channelpoints-service into v2.0 2021-04-27 18:15:04 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit d682baa864 - Show all commits

View File

@ -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)

View File

@ -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)