Compare commits
No commits in common. "ca48b67a01acfb34352c916e257270d30fe6e7a9" and "ded62cefacfa5726b9a0877b8f85152ae1487e1b" have entirely different histories.
ca48b67a01
...
ded62cefac
@ -1,11 +0,0 @@
|
|||||||
FROM python:3.10.0a7-alpine3.13
|
|
||||||
|
|
||||||
WORKDIR /Praxis
|
|
||||||
|
|
||||||
COPY requirements_sa_command.txt requirements_sa_command.txt
|
|
||||||
RUN apk add --update gcc libc-dev linux-headers && rm -rf /var/cache/apk/*
|
|
||||||
RUN pip3 install -r requirements_sa_command.txt
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
CMD [ "python3", "standalone_channelpoints.py"]
|
|
||||||
@ -3,13 +3,7 @@ services:
|
|||||||
standalone_command:
|
standalone_command:
|
||||||
image: standalone_command
|
image: standalone_command
|
||||||
ports:
|
ports:
|
||||||
- 6009:6009
|
- 5000:5000
|
||||||
environment:
|
|
||||||
- ISDOCKER=cat
|
|
||||||
standalone_channelpoints:
|
|
||||||
image: standalone_channelpoints
|
|
||||||
ports:
|
|
||||||
- 6969:6969
|
|
||||||
environment:
|
environment:
|
||||||
- ISDOCKER=cat
|
- ISDOCKER=cat
|
||||||
standalone_twitchscript:
|
standalone_twitchscript:
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
docker build --file Dockerfile_standalone_command --tag standalone_command .
|
docker build --file Dockerfile_standalone_command --tag standalone_command .
|
||||||
docker build --file Dockerfile_standalone_channelpoints --tag standalone_channelpoints .
|
|
||||||
docker build --file Dockerfile_standalone_DiscordScript --tag standalone_discordscript .
|
docker build --file Dockerfile_standalone_DiscordScript --tag standalone_discordscript .
|
||||||
docker build --file Dockerfile_standalone_TwitchScript --tag standalone_twitchscript .
|
docker build --file Dockerfile_standalone_TwitchScript --tag standalone_twitchscript .
|
||||||
docker build --file Dockerfile_standalone_Twitch_Pubsub --tag standalone_twitch_pubsub .
|
docker build --file Dockerfile_standalone_Twitch_Pubsub --tag standalone_twitch_pubsub .
|
||||||
@ -75,4 +75,4 @@ def exec_command():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
init()
|
init()
|
||||||
api.run(host='0.0.0.0', port=6969)
|
api.run(host='0.0.0.0')
|
||||||
|
|||||||
@ -75,4 +75,4 @@ def exec_command():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
init()
|
init()
|
||||||
api.run(host='0.0.0.0', port=6009)
|
api.run(host='0.0.0.0')
|
||||||
|
|||||||
@ -87,14 +87,14 @@ class Discord_Module(discord.Client):
|
|||||||
async def is_command(self, word: str) -> bool:
|
async def is_command(self, word: str) -> bool:
|
||||||
# todo need to url-escape word
|
# todo need to url-escape word
|
||||||
clean_param = urlencode({'name': word})
|
clean_param = urlencode({'name': word})
|
||||||
url = "http://standalone_command:6009/api/v1/command?%s" % clean_param
|
url = "http://standalone_command:5000/api/v1/command?%s" % clean_param
|
||||||
resp = requests.get(url)
|
resp = requests.get(url)
|
||||||
return resp.status_code == 200
|
return resp.status_code == 200
|
||||||
|
|
||||||
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:5000/api/v1/exec?%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)
|
||||||
|
|||||||
@ -69,14 +69,14 @@ class Twitch_Module():
|
|||||||
def is_command(self, word: str) -> bool:
|
def is_command(self, word: str) -> bool:
|
||||||
# todo need to url-escape word
|
# todo need to url-escape word
|
||||||
clean_param = urlencode({'name': word})
|
clean_param = urlencode({'name': word})
|
||||||
url = "http://standalone_command:6009/api/v1/command?%s" % clean_param
|
url = "http://standalone_command:5000/api/v1/command?%s" % clean_param
|
||||||
resp = requests.get(url)
|
resp = requests.get(url)
|
||||||
return resp.status_code == 200
|
return resp.status_code == 200
|
||||||
|
|
||||||
def exec_command(self, realMessage: twitch.chat.Message, command: str, rest: str):
|
def exec_command(self, realMessage: twitch.chat.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.Twitch,'user_name': realMessage.sender, 'command_name': command, 'rest': rest, 'bonus_data': realMessage})
|
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:5000/api/v1/exec?%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