address/api fix

This commit is contained in:
Alex Orid 2021-04-26 19:49:11 -04:00
parent 41a3362b64
commit 9c0172b021
4 changed files with 12 additions and 4 deletions

View File

@ -197,4 +197,4 @@ if __name__ == "__main__":
#testModule.discordCredential = credentials_manager.find_Discord_Credential(config.credentialsNickname)
testModule.main()
testModule.raveMode()
#testModule.raveMode()

View File

@ -0,0 +1,8 @@
cd "c:\praxis"
docker-compose down
docker build --file Dockerfile_standalone_command --tag standalone_command .
docker build --file Dockerfile_standalone_channelRewards --tag standalone_channelrewards .
docker build --file Dockerfile_standalone_DiscordScript --tag standalone_discordscript .
docker build --file Dockerfile_standalone_TwitchScript --tag standalone_twitchscript .
docker build --file Dockerfile_standalone_Twitch_Pubsub --tag standalone_twitch_pubsub .
docker-compose up -d

View File

@ -94,7 +94,7 @@ class Discord_Module(discord.Client):
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://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)

View File

@ -122,7 +122,7 @@ class Twitch_Pubsub():
clean_param = urlencode({'reward_name': rewardName, 'reward_type':rewardType})
print(rewardName, rewardType)
#standalone_channelrewards
url = "http://localhost:6969/api/v1/reward?%s" % clean_param
url = "http://standalone_channelrewards:6969/api/v1/reward?%s" % clean_param
resp = requests.get(url)
return resp.status_code == 200
@ -137,7 +137,7 @@ class Twitch_Pubsub():
'bonus_data': realMessage})
#standalone_channelrewards
url = "http://localhost:6969/api/v1/exec_reward?%s" % params
url = "http://standalone_channelrewards:6969/api/v1/exec_reward?%s" % params
resp = requests.get(url)
if resp.status_code == 200:
print("Got the following message: %s" % resp.text)