diff --git a/discord_script_standalone.py b/discord_script_standalone.py index c47d723..c71a971 100644 --- a/discord_script_standalone.py +++ b/discord_script_standalone.py @@ -85,14 +85,14 @@ class Discord_Module(discord.Client): async def is_command(self, word: str) -> bool: # todo need to url-escape word clean_param = urlencode({'name': word}) - url = "http://localhost:5000/api/v1/command?%s" % clean_param + url = "http://standalone_command:5000/api/v1/command?%s" % clean_param resp = requests.get(url) return resp.status_code == 200 async def exec_command(self, realMessage: discord.Message, command: str, rest: str): # todo need to url-escape command and rest params = urlencode({'command_source': commands.command_base.AbstractCommand.CommandSource.Discord, 'user_name': realMessage.author.mention, 'command_name': command, 'rest': rest, 'bonus_data': realMessage}) - url = "http://localhost:5000/api/v1/exec?%s" % params + url = "http://standalone_command:5000/api/v1/exec?%s" % params resp = requests.get(url) if resp.status_code == 200: print("Got the following message: %s" % resp.text) diff --git a/twitch_script_standalone.py b/twitch_script_standalone.py index 867074a..03eac64 100644 --- a/twitch_script_standalone.py +++ b/twitch_script_standalone.py @@ -69,14 +69,14 @@ class Twitch_Module(): def is_command(self, word: str) -> bool: # todo need to url-escape word clean_param = urlencode({'name': word}) - url = "http://localhost:5000/api/v1/command?%s" % clean_param + url = "http://standalone_command:5000/api/v1/command?%s" % clean_param resp = requests.get(url) return resp.status_code == 200 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://localhost:5000/api/v1/exec?%s" % params + url = "http://standalone_command:5000/api/v1/exec?%s" % params resp = requests.get(url) if resp.status_code == 200: print("Got the following message: %s" % resp.text)