This repo contains two copy/paste-ready C# scripts for Streamer.bot's Execute C# Code sub-action:
Listener_ChatLogger.cs(chat logger / short-term memory)Brain_PerpetualResponse.cs(AI response generator)
Default personality and naming are now set for Auto_Mark (resident AI mod / robotic co-host persona).
- In Streamer.bot, create Action:
Auto_Mark - Listener. - Add sub-action: Execute C# Code.
- Paste code from
Listener_ChatLogger.cs. - Add Trigger: Twitch > Chat Message.
What it does:
- Reads Global Var
chat_buffer. - Appends each incoming message as
[User]: Message. - Trims buffer to ~1000 chars.
- Saves back to Global Var
chat_buffer. - Skips self-logging when the sender matches
perpetual_bot_name.
- Create Action:
Auto_Mark - Brain. - Add sub-action: Execute C# Code.
- Paste code from
Brain_PerpetualResponse.cs. - Add Trigger:
- Command Trigger: e.g.
!auto_mark(recommended), OR - Chat Message Trigger with your chosen keyword logic.
- Command Trigger: e.g.
What it does:
- Pulls
chat_buffer, current user name, and current message. - Pulls User Var
perpetual_lorefor that user. - Builds the model prompt using configurable bot name + system prompt.
- Uses
ai_providerto pick Gemini or OpenAI key + default endpoint/model. - Parses and posts model response to chat.
- Logs API errors via
CPH.LogInfo.
Set these in Global Variables:
perpetual_bot_name= defaultAuto_Markai_provider=geminioropenai(defaultgemini)gemini_api_key= your Gemini keyopenai_api_key= your OpenAI keyai_endpoint= optional override (provider default used if empty)ai_model= optional override (provider default used if empty)perpetual_system_prompt= full Auto_Mark persona promptchat_buffer= empty string initially
Backward compatibility:
- Shared key variable
ai_api_keyis still supported. - Legacy
google_api_keyis checked for Gemini ifgemini_api_keyis missing.
Optional per-user variable:
perpetual_lore(User Variable), e.g.Fumbles every platform jump.
The default system prompt implements this behavior:
- resident AI mod and robotic co-host in TheDeutschMark universe
- self-aware bot created/coded by Mark
- witty, meta-humor, sarcastic, but useful for moderation/help
- recurring Botzandra obsession lore joke
- references to channel identity (TheDeutschMark, Jacob & Willie) when relevant
- concise, streamer-safe replies
- Create both actions and paste scripts.
- Create triggers:
Auto_Mark - Listener-> Twitch Chat MessageAuto_Mark - Brain->!auto_markcommand
- Pre-create global variables listed above with defaults.
- Export as a Streamer.bot extension package.
- In your shared README/changelog include:
- required Streamer.bot version
- required Twitch account auth state
- variable table from section 3
- first-run instructions to set
ai_providerand provider key
- Test import on a clean Streamer.bot profile before publishing.
- Paste both scripts into their corresponding Streamer.bot actions.
- Set
ai_provider(geminioropenai) and matching API key variable. - Confirm globals use defaults (or customize name/model/prompt).
- Send test chat messages to populate
chat_buffer. - Run
!auto_mark roast me.