docker fix

This commit is contained in:
Alex Orid 2021-04-21 21:33:30 -04:00
parent 81a51a26a1
commit a54686d07a
2 changed files with 4 additions and 4 deletions

View File

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

View File

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