|
@@ -10,6 +10,7 @@ try:
|
|
|
from names import m_name
|
|
|
from config import *
|
|
|
from auth import *
|
|
|
+ from DTChatbot import *
|
|
|
from flask import Flask, jsonify, current_app, request
|
|
|
import requests
|
|
|
import logging
|
|
@@ -103,10 +104,6 @@ def mc_chat(mc_msg): # Send chat message to Minecraft chat
|
|
|
logging.info(f'{get_now()} - DeadTOm is not on the server, so not sending message.')
|
|
|
|
|
|
|
|
|
-def chat_bot(bot_msg): # Send chat message to chatbot
|
|
|
- logging.info(f'{get_now()} - {bot_msg}')
|
|
|
-
|
|
|
-
|
|
|
def set_hashtags(title): # Sets up hash tags to be appended to social media
|
|
|
logging.info(f'{get_now()} - Examining stream title \"{title}\" to apply hashtags.')
|
|
|
check_title = title.lower()
|
|
@@ -239,7 +236,7 @@ def send_chatbot():
|
|
|
chatter_name = event_data['user']['displayName']
|
|
|
chat_msg = event_data['rawBody']
|
|
|
bot_msg = f'{chatter_name}, {chat_msg}'
|
|
|
- chat_bot(bot_msg)
|
|
|
+ DTChatbot.chat_bot(bot_msg)
|
|
|
logging.info(f'{get_now()} - Sent to chat bot.')
|
|
|
|
|
|
return jsonify({"Data": raw_data, })
|