r/streamerbot • • 11h ago

❓Question Help With Setting up timers

0 Upvotes

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.


r/streamerbot • • 6d ago

❓Question Specific Game Prevent Streamer.bot Actions From Activating

1 Upvotes

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.

Can't find anything about this online. Any ideas?


r/streamerbot • • 6d ago

❓Question Streamerbot crashing as soon as I click "Login" at the bottom left of application, or pc extreme slowdown then crash?

1 Upvotes

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.


r/streamerbot • • 8d ago

❓Question Is there a way to limit a variables characters by chance?

1 Upvotes

If not no worries :3


r/streamerbot • • 8d ago

💬Discussion Can streamerbot get more advantage if it was built on Rust?

0 Upvotes

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?


r/streamerbot • • 10d ago

❓Question Controlling lights

2 Upvotes

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?

Thanks!


r/streamerbot • • 10d ago

❓Question StreamerBot takes forever to open (among other issues)

Thumbnail
gallery
0 Upvotes

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


r/streamerbot • • 10d ago

❓Question Change JUST the emojis in stream title?

3 Upvotes

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.


r/streamerbot • • 12d ago

❓Question [Linux] Unable to load DLL 'mscms.dll'

0 Upvotes

Has anyone had this issue in Fedora Linux? I used the official script found here.

Logs:

[2026-11-11 13:03:23.830 DBG] MIDI :: Loaded 0 actions.
[2026-11-11 13:03:24.387 DBG] Credits :: Performing auto reset of data, 44.1167958683889 > 12
[2026-11-11 13:03:24.552 DBG] Streamer.bot Service :: Logging into Streamer.bot Website account
[2026-11-11 13:03:24.555 WRN] TokenManager :: Streamer.bot Website requested an access token, but no credentials exist.
[2026-11-11 13:03:24.555 INF] Streamer.bot Service :: Token retrieval failed or credentials missing.
[2026-11-11 13:03:24.555 WRN] Streamer.bot Website service failed to initialize during startup. Application will continue in offline mode.
[2026-11-11 13:03:26.098 FTL] Fatal Thread Exception
System.DllNotFoundException: Unable to load DLL 'mscms.dll': Module not found. (Exception from HRESULT: 0x8007007E)
   at MS.Win32.PresentationCore.UnsafeNativeMethods.Mscms.OpenColorProfile(PROFILE& pProfile, UInt32 dwDesiredAccess, UInt32 dwShareMode, UInt32 dwCreationMode)
   at System.Windows.Media.ColorContext.FromRawBytes(Byte[] data, Int32 dataLength, Boolean dontThrowException)
   at System.Windows.Media.ColorContext..ctor(SafeMILHandle colorContextHandle)
   at System.Windows.Media.ColorContext.GetColorContextsHelper(GetColorContextsDelegate getColorContexts)
   at System.Windows.Media.Imaging.BitmapFrameDecode.get_ColorContexts()
   at System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(BitmapFrame frame, BitmapSourceSafeMILHandle wicSource, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapPalette palette)
   at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)
   at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
   at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
   at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at _gPleyfxUeO0pnMab3nTeLezuzid.‍‍‍‍‍(TypeConverter , String )
   at _gPleyfxUeO0pnMab3nTeLezuzid..ctor(_m1GlZjTw9HJRlnHHaLJc4v2zIcb , _k0228C20jJFZoAHoDTps8tfVuZD , _0F1Xayuj1iXh2RAEnreLlnxBpoQ , INavigationService , ISnackbarService , _gDr0GDELmZQq0xT0wGdduwBvber , _J9ceKS4WlrwvVPBfdN4a4Az8Oc2 , _ubpfKC6msMwlzryA6lMuxz9muqV , _8dVrNasbhM3OdPXJGiI0vElHH2cA , _f6kHiC7B7t4LKV3LICgYpxjPzqA , _NTCWcJBda7lclugclVxIvleoLzO , _D7ERAXuiE8NOeyhU8tJ8PnIfCHh , _Lic4OjezwbghN2YdXkVLzygCtxe )
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at _nKdQ9jdDYCzwNZgexp0X3aW2W6e._KKcvHI9awa5ULsHzYeZ8tW0c6mg(StartupEventArgs )
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)[2026-11-11 13:03:23.830 DBG] MIDI :: Loaded 0 actions.
[2026-11-11 13:03:24.387 DBG] Credits :: Performing auto reset of data, 44.1167958683889 > 12
[2026-11-11 13:03:24.552 DBG] Streamer.bot Service :: Logging into Streamer.bot Website account
[2026-11-11 13:03:24.555 WRN] TokenManager :: Streamer.bot Website requested an access token, but no credentials exist.
[2026-11-11 13:03:24.555 INF] Streamer.bot Service :: Token retrieval failed or credentials missing.
[2026-11-11 13:03:24.555 WRN] Streamer.bot Website service failed to initialize during startup. Application will continue in offline mode.
[2026-11-11 13:03:26.098 FTL] Fatal Thread Exception
System.DllNotFoundException: Unable to load DLL 'mscms.dll': Module not found. (Exception from HRESULT: 0x8007007E)
   at MS.Win32.PresentationCore.UnsafeNativeMethods.Mscms.OpenColorProfile(PROFILE& pProfile, UInt32 dwDesiredAccess, UInt32 dwShareMode, UInt32 dwCreationMode)
   at System.Windows.Media.ColorContext.FromRawBytes(Byte[] data, Int32 dataLength, Boolean dontThrowException)
   at System.Windows.Media.ColorContext..ctor(SafeMILHandle colorContextHandle)
   at System.Windows.Media.ColorContext.GetColorContextsHelper(GetColorContextsDelegate getColorContexts)
   at System.Windows.Media.Imaging.BitmapFrameDecode.get_ColorContexts()
   at System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(BitmapFrame frame, BitmapSourceSafeMILHandle wicSource, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapPalette palette)
   at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)
   at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
   at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
   at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at _gPleyfxUeO0pnMab3nTeLezuzid.‍‍‍‍‍(TypeConverter , String )
   at _gPleyfxUeO0pnMab3nTeLezuzid..ctor(_m1GlZjTw9HJRlnHHaLJc4v2zIcb , _k0228C20jJFZoAHoDTps8tfVuZD , _0F1Xayuj1iXh2RAEnreLlnxBpoQ , INavigationService , ISnackbarService , _gDr0GDELmZQq0xT0wGdduwBvber , _J9ceKS4WlrwvVPBfdN4a4Az8Oc2 , _ubpfKC6msMwlzryA6lMuxz9muqV , _8dVrNasbhM3OdPXJGiI0vElHH2cA , _f6kHiC7B7t4LKV3LICgYpxjPzqA , _NTCWcJBda7lclugclVxIvleoLzO , _D7ERAXuiE8NOeyhU8tJ8PnIfCHh , _Lic4OjezwbghN2YdXkVLzygCtxe )
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at _nKdQ9jdDYCzwNZgexp0X3aW2W6e._KKcvHI9awa5ULsHzYeZ8tW0c6mg(StartupEventArgs )
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

r/streamerbot • • 13d ago

❓Question Does anyone know how to use different voices in Speakerbot?

0 Upvotes

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?


r/streamerbot • • 16d ago

❓Question Can someone explain why this isn't working?

0 Upvotes

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!***


r/streamerbot • • 17d ago

❓Question Read lines of text from file to display text in OBS

1 Upvotes

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!


r/streamerbot • • 18d ago

📖Resources Bot Responding was broken, here's my fix.

0 Upvotes

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.


r/streamerbot • • 20d ago

❓Question How to properly set up 1st, 2nd and 3rd rewards

4 Upvotes

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...


r/streamerbot • • 27d ago

❓Question HELP : Bot cannot create or even view channel point rewards

1 Upvotes

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.


r/streamerbot • • 28d ago

❓Question Could someone please help me fix my auto shoutouts for certain streamers

Thumbnail
gallery
3 Upvotes

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!!


r/streamerbot • • 27d ago

❓Question Blue line

Post image
0 Upvotes

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?


r/streamerbot • • 28d ago

❓Question I can't connect

Thumbnail
gallery
2 Upvotes

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?


r/streamerbot • • 29d ago

💬Discussion best way to learn C#?

4 Upvotes

What is the best way to learn C# coding specifically for StreamrBot?
Just starting the journey(after stumbling through on my own).


r/streamerbot • • Oct 24 '26

📖Resources Stream Alerts Tutorial

Thumbnail
youtube.com
7 Upvotes

I made this tutorial showing how to setup notifications for new followers, subs, resubs, gift subs, and even watch streaks! (OBS + Twitch)


r/streamerbot • • Oct 22 '26

❓Question Channel point redeem video clip using one source

1 Upvotes

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


r/streamerbot • • Oct 22 '26

❓Question Help! (Webview 2 Error - Chat Box)

Post image
1 Upvotes

(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.


r/streamerbot • • Oct 22 '26

❓Question Multiple SFX linked to 1 redeem

1 Upvotes

Howdy all!

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?


r/streamerbot • • Oct 20 '26

❓Question Need Help with a Counter

0 Upvotes

Hello!

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 :>