浏览代码

ocb_url added to settings menu

deadtom 1 月之前
父节点
当前提交
9059dd58f9
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. 7 1
      ownchatbot/templates/mgmt.html
  2. 5 1
      ownchatbot/web_panels.py

+ 7 - 1
ownchatbot/templates/mgmt.html

@@ -34,7 +34,7 @@
             <li><u>Redeems</u> are standard stream point rewards. They get added to the queue for the streamer to fulfill.</li>
             <li><u>Specials</u> are redeems, but they run system commands and scripts. This enables you to integrate a lot of other fun things, such as letting your viewers control lighting, activate devices, trigger webhooks, etc. Specials do not go into the queue, because they happen automagically.</li>
               <ul>
-                <li>Be careful with this one. It does require some more advanced scripting/command line knowledge. Make sure you test your specials before letting viewers use them.</li>
+                <li>Be careful with this one. It does require some more advanced scripting/command line knowledge, and it can be dangerous. Make sure you test your specials thoroughly before letting viewers use them.</li>
               </ul>
             <li><u>Votes</u> are just that, votes. Your viewers can vote on them.</li>
             <li><u>Goals</u> are rewards that everyone in chat can contribute to. The streamer fulfills the reward when the goal is reached.</li>
@@ -336,6 +336,12 @@
                         <td> <input type="text" name="prefix" maxlength="1" size="1" value="{{ settings_info[4] }}" required> </td>
                         <td>Character that preceeds chat commands, so OwnchatBot knows what to look for.<br>Example: "{{ settings_info[4] }}points"</td>
                     </tr>
+                    <tr>
+                        <td> <label for=ocb_url>External URL:</label> </td>
+                        <td> <input type="text" name="ocb_url" size="40" value="{{ settings_info[11] }}" required> </td>
+                        <td>What is the external URL of your OwnchatBot?</td>
+                    </tr>
+                        
                 </table>
                 
                 <h3>Owncast Integration</h3>

+ 5 - 1
ownchatbot/web_panels.py

@@ -110,6 +110,7 @@ def mgmt():
     todolist_items = current_app.config['LIST']
     active_tab = request.args.get('activeTab')
     alerts_dict = current_app.config['ALERTS']
+    ocb_url = current_app.config['OCB_URL']
     settings_info = [
         access_id,
         points_interval,
@@ -121,7 +122,8 @@ def mgmt():
         kofi_token,
         kofi_integration,
         announce_enable,
-        announce_interval
+        announce_interval,
+        ocb_url
         ]
 
     return render_template('mgmt.html',
@@ -341,6 +343,7 @@ def settings():
     access_id = request.form['access_id']
     access_token = request.form['access_token']
     owncast_url = request.form['owncast_url']
+    ocb_url = request.form['ocb_url']
     kofi_integration = 'kofi_integration' in request.form
     kofi_token = request.form['kofi_token']
     config_dict = {
@@ -348,6 +351,7 @@ def settings():
         'POINTS_AWARD': points_award,
         'GUNICORN': gunicorn_logging,
         'PREFIX': prefix,
+        'OCB_URL': ocb_url,
         'ACCESS_ID': access_id,
         'ACCESS_TOKEN': access_token,
         'OWNCAST_URL': owncast_url,