|
@@ -4,8 +4,6 @@
|
|
|
# Date last modified: 10/15/2022
|
|
|
# Python Version: 3.9.2
|
|
|
# Copyright © 2022 DeadTOm
|
|
|
-# Description: Webhooks for Owncast to send notifications to Discord, Mastodon and Twitter, and to interact with
|
|
|
-# my Minecraft server
|
|
|
# TODO: Make routes for various chat and video links
|
|
|
|
|
|
try:
|
|
@@ -158,10 +156,10 @@ def start():
|
|
|
logging.debug(f'{get_now()} - Constructed Mastodon/Twitter message: {msg}')
|
|
|
discmsg = f'DeadTOm is streaming on Owncast, at https://owncast.deadtom.me. {stream_title}'
|
|
|
if testing != 1: # If we're testing, don't actually send out notification
|
|
|
- social_post(msg, discmsg)
|
|
|
streaming_m_name()
|
|
|
streaming_t_name()
|
|
|
write_current_names()
|
|
|
+ social_post(msg, discmsg)
|
|
|
else:
|
|
|
logging.info(f'-----------------------\n\n'
|
|
|
f'{get_now()} - Currently running in test mode. We are streaming, but no notifications are being sent to social media.'
|
|
@@ -179,6 +177,8 @@ def stop():
|
|
|
msg = f'All done streaming, for now. Maybe catch me next time on Owncast, at https://owncast.deadtom.me.\n\n{hashtags}'
|
|
|
discmsg = f'DeadTOm is done streaming.'
|
|
|
if testing != 1: # If we're testing, don't actually send out notification
|
|
|
+ reg_m_name()
|
|
|
+ reg_t_name()
|
|
|
social_post(msg, discmsg)
|
|
|
|
|
|
return jsonify({"Data": raw_data,})
|