Hi all and sorry in advance if this is a dumb question but im new to streamer bot and decided to try it as someone said it would be the perfect fix to what im trying to do.
im trying to make it apply a filter on a browser source but only for the first 5 seconds of a 20 second loop but cant seem to make it work. (actual goal is a 5 min loop where 4:30 is filtered)
so what im asking is how is this possible as every attempt i done seems to be failing pretty hard as best i got is 10 seconds with and 10 seconds without which wont work for my current idea.
Tried playing the game Grim Dawn while testing some stream setup stuff, and realized that none of my streamer.bot actions work while I have the game is my active window. Tested with Dressmaker and FF14, actions work fine while playing those. All three games were in Borderless Windowed mode. I have the actions bound to the f14, f15, and f16 keys on my keyboard. I do not think Grim Dawn is blocking access to these keys, at least not universally, because I have a Steelseries GG command bound to f13 and that still works while Grim Dawn is selected.
Mostly as the title says, if I launch Streamerbot it seems to work fine for a little while, I go into settings and after a short length it will slow everything down to a crawl for about 5 seconds then crash.
Alternatively if I load up streamerbot and click on the "Login" button on the bottom left, a few buttons slide up from it but then it crashes.
Both times it makes a windows error sound and looking at windows event viewer "Administrative Events" there's 2-3 that happen on a crash: The first complains at kernelbase.dll in my system32. I've tried running sfc Scannow but it returns no issues. Even doing a DISM image restore and such but still no issues. The second is a .NET Runtime error. Which I tried installing a 4.0 but it's either End of service or the one I did try from microsoft said I had already installed?
Can't find much information for this in general at least specifically for Streamerbot. No other application I have tried does this. I tried re-downloading and moving to different folders too just incase.
Now that there is so much hype on the Discord Project Phoenix news, can we have more advantage if streamerbot was built on Rust? or the fastest, lightest and had the most feature version of streamerbot is the current streamerbot?
Does anyone know how I can get Streamer.bot to turn lights on and off automatically for me? They're studio lights to illuminate my green screen. Right now they're on all the time, but I'm only actually on camera when a redeem is activated so that means I'm under bright, hot lights for a lot longer than I need to be. Sometimes it gives me a headache.
I'm thinking if I put all the lights on the same power strip then I could probably get that strip (or a smart plug it's plugged into) to turn on and off with the redeem, but I don't know where to get started setting that up. Any ideas?
ever since i updated to 1.0.7, StreamerBot has taken anywhere from 2-3 minutes to open. aside from this, i cannot log in to StreamerBot (sometimes the login button doesn't work, sometimes it does and just never logs in. the copy login link does not copy anything). apart from this, whenever i try to log in to the StreamElements integration, it takes ages to do anything and then says it wasn't able to fetch an authorization token.
i would really like to start using some of these integrations and it's pretty much impossible. i've uninstalled and reinstalled 1.0.7, i've uninstalled and reinstalled earlier versions, and i've done a network reset for my computer. nothing has worked so far, so i'm hoping for some suggestions
update: i got it fixed!! opened up a support tab in the discord per u/RythonDev 's suggestion and got it fixed! something with my ipv6 being blocked
So I'm thinking I'd like to have a Twitch channel point redeem where somebody can choose the emojis that are in my stream title but keep the text information. For instance, if my title was "Ranked Warzone ☢️ Diamond ☢️ Snipers Only" and they wanted to change the ☢️emoji to ⛔️, the new title should be "Ranked Warzone ⛔️ Diamond ⛔️ Snipers Only".
Of course I could manually change the title myself, but I'm hoping there is a way I can automate it to some degree using streamer.bot? I have a Streamdeck that I could integrate as well if that helps.
I am trying to set up different character voices as rewards for channel points on my streaming channel. For example, I want Goku’s voice to read out a message sent in the chat in exchange for a certain number of points.
Is there any way to add voice banks for different characters—other than just using Sabina with SAPI5?
I am trying to get an effect to trigger after one of my redeems is triggered 5 times during a stream.
I am still new to understanding a lot of what streamer bot can do. I can see the variable incrementing in my temp globals but I cant get it to trigger even when its equal to 5
*** EDIT Thanks yall I was able to get it working!***
I'm feeling a bit lost in how to accomplish this. I'm wanting to display names of people from a text file to overlay on top of pictures they've made. Is it possible to read name in the file, then continue down the list to display? I'd appreciate any input!
A lot of us, myself included have been using ChatGPT to have our bots respond to chats either at random or through a redeem. With the deprecation of the 4o-mini model this has caused some issues with my bot and other friend's bots, so here is the code for my fix.
using System;
using System.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using System.Text.RegularExpressions;
using System.Collections.Generic;
public class CPHInline
{
private static Dictionary<string, List<Message>> conversationHistories;
public bool Execute()
{
// Each run starts with an empty action-local reply; never reuse the last reply.
CPH.LogInfo("SNB TEST: C# execution started");
CPH.SetArgument("finalGPT", "");
try
{
LoadConversationHistories();
string apiKey = args["chatGPT3APIkey"].ToString();
string model = args["model"].ToString();
string content = args["behavior"].ToString();
string messageInput = args["textInput"].ToString();
string user = args["user"].ToString();
if (String.IsNullOrWhiteSpace(apiKey) ||
String.IsNullOrWhiteSpace(model) ||
String.IsNullOrWhiteSpace(messageInput) ||
String.IsNullOrWhiteSpace(user))
{
throw new Exception("Missing API key, model, chat message, or user argument.");
}
ChatGPTAPI chatGPT = new ChatGPTAPI(apiKey);
// The original per-user conversation history behavior is unchanged.
if (!conversationHistories.ContainsKey(user))
{
conversationHistories[user] = new List<Message>();
}
var history = conversationHistories[user];
history.Add(new Message { role = "user", content = messageInput });
string response = chatGPT.GenerateResponse(history, model, content);
Root root = JsonConvert.DeserializeObject<Root>(response);
if (root == null || root.choices == null || root.choices.Count == 0 ||
root.choices[0] == null || root.choices[0].message == null ||
String.IsNullOrWhiteSpace(root.choices[0].message.content))
{
throw new Exception("OpenAI returned no usable assistant text.");
}
string assistantResponse = root.choices[0].message.content;
history.Add(new Message { role = "assistant", content = assistantResponse });
// Exactly the same storage call and file format as before.
SaveConversationHistories();
string cleanedResponse = CleanResponse(assistantResponse);
if (String.IsNullOrWhiteSpace(cleanedResponse))
{
throw new Exception("The assistant response was empty after cleaning.");
}
// Action-local output, not a shared GPT global variable.
CPH.SetArgument("finalGPT", cleanedResponse);
CPH.LogInfo("SnotBotAlpha GPT: " + cleanedResponse);
return true;
}
catch (WebException ex)
{
string details = ex.Message;
if (ex.Response != null)
{
HttpWebResponse httpResponse = ex.Response as HttpWebResponse;
if (httpResponse != null)
{
details += " | HTTP " + (int)httpResponse.StatusCode;
}
try
{
using (Stream stream = ex.Response.GetResponseStream())
{
if (stream != null)
{
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
{
details += " | " + reader.ReadToEnd();
}
}
}
}
catch (Exception) { /* Keep original HTTP error if body cannot be read. */ }
finally { ex.Response.Dispose(); }
}
if (details.Length > 1500) details = details.Substring(0, 1500);
CPH.LogError("SnotBotAlpha OpenAI request failed: " + details);
return false; // Do not post, speak, or animate a failed reply.
}
catch (Exception ex)
{
CPH.LogError("SnotBotAlpha response failed: " + ex.Message);
return false; // Prevent a stale or missing response being used.
}
}
// ORIGINAL: conversationHistories.json loading is unchanged.
private void LoadConversationHistories()
{
try
{
string filePath = "conversationHistories.json";
if (File.Exists(filePath))
{
string json = File.ReadAllText(filePath);
conversationHistories = JsonConvert.DeserializeObject<Dictionary<string, List<Message>>>(json);
}
else
{
conversationHistories = new Dictionary<string, List<Message>>();
}
}
catch (Exception ex)
{
CPH.LogError("Failed to load conversation histories: " + ex.Message);
conversationHistories = new Dictionary<string, List<Message>>();
}
}
// ORIGINAL: conversationHistories.json saving is unchanged.
private void SaveConversationHistories()
{
try
{
string filePath = "conversationHistories.json";
string json = JsonConvert.SerializeObject(conversationHistories, Formatting.Indented);
File.WriteAllText(filePath, json);
}
catch (Exception ex)
{
CPH.LogError("Failed to save conversation histories: " + ex.Message);
}
}
// ORIGINAL: response cleaning is unchanged.
private string CleanResponse(string response)
{
string cleaned0 = response.Replace(Environment.NewLine, " ");
string cleaned1 = Regex.Replace(cleaned0, @"\r\n?|\n", " ");
string cleaned2 = Regex.Replace(cleaned1, @"[\r\n]+", " ");
string unescaped = Regex.Unescape(cleaned2);
return unescaped.Trim();
}
}
class ChatGPTAPI
{
private string _apiKey;
private string _endpoint = "https://api.openai.com/v1/chat/completions";
private const int MaxTokens = 4096;
public ChatGPTAPI(string apiKey)
{
_apiKey = apiKey;
}
public string GenerateResponse(List<Message> history, string model, string behavior)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_endpoint);
request.Headers.Add("Authorization", "Bearer " + _apiKey);
request.ContentType = "application/json";
request.Method = "POST";
request.Timeout = 60000;
request.ReadWriteTimeout = 60000;
var messages = new List<Message> { new Message { role = "system", content = behavior } };
messages.AddRange(history);
// ORIGINAL: history trimming logic is unchanged.
int totalTokens = GetTokenCount(messages);
while (totalTokens > MaxTokens - 100)
{
if (history.Count > 2)
{
history.RemoveAt(0);
history.RemoveAt(0);
}
else
{
break;
}
messages = new List<Message> { new Message { role = "system", content = behavior } };
messages.AddRange(history);
totalTokens = GetTokenCount(messages);
}
// GPT-6 Luna supports this Chat Completions request configuration.
// The previous temperature setting is deliberately not sent.
string requestBody = JsonConvert.SerializeObject(new
{
model = model,
max_completion_tokens = 100,
reasoning_effort = "none",
messages = messages
});
byte[] bytes = Encoding.UTF8.GetBytes(requestBody);
request.ContentLength = bytes.Length;
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream responseStream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
{
return reader.ReadToEnd();
}
}
// ORIGINAL: token estimate and history policy are unchanged.
private int GetTokenCount(List<Message> messages)
{
int tokenCount = 0;
foreach (var message in messages)
{
tokenCount += message.content.Split(' ').Length;
}
return tokenCount;
}
}
public class Message
{
public string role { get; set; }
public string content { get; set; }
}
public class Choice
{
public Message message { get; set; }
public int index { get; set; }
public object logprobs { get; set; }
public string finish_reason { get; set; }
}
public class Root
{
public string id { get; set; }
public string { get; set; }
public int created { get; set; }
public string model { get; set; }
public List<Choice> choices { get; set; }
public Usage usage { get; set; }
}
public class Usage
{
public int prompt_tokens { get; set; }
public int completion_tokens { get; set; }
public int total_tokens { get; set; }
}
This is based off of the extension found here, https://extensions.streamer.bot/t/chatgpt-bot-integration/865 hopefully this helps some folks out. Replace the code in the Execute Code (Custom GPT [max_tokens: 100]) block with what I've provided above.
I have a greedy ahhh twitch viewer that likes to take the 1st, 2nd and 3rd redeems all to himself. Is there any way that I could somehow make so that if you redeem 1st you can't redeem 2nd and 3rd and if you redeem 2nd you can't redeem 3rd? Or do I just have to rely on my viewers being not greedy...
No idea why this is happening (sorry the video is a bit slow I have so many tabs and monitors up at the moment) For whatever reason streamer.bot is completely unable to make a channel point reward, or even view existing ones. I'm logged into twitch, connected to OBS, the only other thing there is, is that at the moment it's connected to a PNGTuberPlus websocket.
Please help, the channel point redeems are pretty integral to what I want to make.
Could someone please help me fix this? Im trying to do automatic shoutouts for certain streamers in my chat? Ive made an group with all their names in it and ive managed to get the first part of the shoutout working, as you can see...but i cant seem to figure out the code to get what game they played last? Thankyou!!
Streamer.Bot chat section has this constant blue line if no one is chatting. I can refresh all day and it's still there. Any ideas on how to get rid of it?
Everything was working fine until Friday, but when I went to start my stream today, the Stream Deck wouldn't connect to Streamer.bot. I’ve tried everything, but I haven't been able to fix it—can anyone help?
Hello, I have redeems that play video clips on my stream, but the way I have it work now is by making each video it's own media source in a scene, then put that scene inside my main scene, and when the channel point redeem goes off, the media source within the scene activates. I feel like this may be slowing down my OBS.
I know there's a way to use only one media source, and have Streamerbot pick a file to overwrite the media path inside of a media source, but i'm not quite sure how to do that
(UPDATE - FIXED) I ended up doing a repair of Microsoft Edge, and then installing the Webview2 installer and running it as administrator to force it to download a clean new copy of Webview2. Then I went and did the renaming of the Webview2 folder inside of Streamerbot to Webview2OLD and BOOM its back. Hope this helps someone in the future!
Everytime I attempt to open the chat box, I get this error. I have gone into the streamerbot files and deleted the Streamer.bot.exe.WebView2 folder while I had streamer bot closed, and then restarted the program and the error still continues. I am completely lost at how to fix it, even attempted to delete Streamerbot entirely and reinstall it and it still persists.
I was wondering if this is possible for those of you who might know. I was looking to set up a redeem for channel points where it pulls from a pool of different SFX so what you get is random. Say 4-5 different possibilities but linked to the same redeem? I know how to set it up for a single sound, but no idea if multiple can be done?
So I've been playing with streamer bot, and I really want to make a command where users can do !levelup and have it act as a check in of sorts. To that regard, I want it to track how many times a user has done this.
I have the SubAction Global (Set) to increase the increment by one, but I don't know how to have the chat then represent this. Nor do I know how to make it a daily thing only.
I know I could just make this a redeem on the twitch rewards, but I thought this would be a nice way to not clog up the redeems. If anyone has any insight, that would be appreciated :>