master updates #41

Manually merged
alex_orid merged 177 commits from master into github-master 2021-05-13 21:11:10 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 9a9174f687 - Show all commits

View File

@ -22,6 +22,7 @@ def is_command(command:str)->bool:
def handle_command(command, rest):
if command == "!echo":
message = "Got payload [%s]" % rest
print(message)
return flask.make_response("{message:\"%s\"}" % message, 200, {"Content-Type": "application/json"})
@api.route('/api/v1/command', methods=['GET'])

View File

@ -1,10 +1,11 @@
from json import loads
import re
from json import loads
from urllib.parse import urlencode
import requests
import twitch
import twitch.chat
from urllib.parse import urlencode, quote_plus
import config as config
import credentials
from cooldowns import Cooldown_Module
@ -98,6 +99,7 @@ class Twitch_Module():
url = "http://localhost:5000/api/v1/exec?%s" % params
resp = requests.get(url)
if resp.status_code == 200:
print("Got the following message: %s" % resp.text)
data = loads(resp.text)
msg = data['message']
if msg is not None: