address/api fix
This commit is contained in:
parent
41a3362b64
commit
9c0172b021
@ -197,4 +197,4 @@ if __name__ == "__main__":
|
|||||||
#testModule.discordCredential = credentials_manager.find_Discord_Credential(config.credentialsNickname)
|
#testModule.discordCredential = credentials_manager.find_Discord_Credential(config.credentialsNickname)
|
||||||
|
|
||||||
testModule.main()
|
testModule.main()
|
||||||
testModule.raveMode()
|
#testModule.raveMode()
|
||||||
8
rebuild_docker_and_run.bat
Normal file
8
rebuild_docker_and_run.bat
Normal 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
|
||||||
@ -94,7 +94,7 @@ class Discord_Module(discord.Client):
|
|||||||
async def exec_command(self, realMessage: discord.Message, command: str, rest: str):
|
async def exec_command(self, realMessage: discord.Message, command: str, rest: str):
|
||||||
# todo need to url-escape command and rest
|
# 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})
|
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)
|
resp = requests.get(url)
|
||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
print("Got the following message: %s" % resp.text)
|
print("Got the following message: %s" % resp.text)
|
||||||
|
|||||||
@ -122,7 +122,7 @@ class Twitch_Pubsub():
|
|||||||
clean_param = urlencode({'reward_name': rewardName, 'reward_type':rewardType})
|
clean_param = urlencode({'reward_name': rewardName, 'reward_type':rewardType})
|
||||||
print(rewardName, rewardType)
|
print(rewardName, rewardType)
|
||||||
#standalone_channelrewards
|
#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)
|
resp = requests.get(url)
|
||||||
return resp.status_code == 200
|
return resp.status_code == 200
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ class Twitch_Pubsub():
|
|||||||
'bonus_data': realMessage})
|
'bonus_data': realMessage})
|
||||||
|
|
||||||
#standalone_channelrewards
|
#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)
|
resp = requests.get(url)
|
||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
print("Got the following message: %s" % resp.text)
|
print("Got the following message: %s" % resp.text)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user