Comments (12)
The differenve between normal users, subs, mods and broadcasters are stored inside the {{classes}} variable.
You can find more class types here:
streamer.bot-actions/widget/chat/js/script.js
Lines 105 to 135 in 69a3355
Default Theme template
<template id="message_twitch">
<li id="{{msgId}}" class="{{classes}}" style="--userColor:{{color}}">
<div class="avatar">
<img src="{{avatar}}" />
</div>
<div class="message">
<span class="badges">{{badges}}</span>
<span class="name">{{displayName}}</span>
<div class="content">{{message}}</div>
<div class="time">{{time}}</div>
</div>
</li>
</template>
Example Message
<li id="32d8db00-bef1-44cf-b66f-fa651c5d237c" class="msg subscriber broadcaster animate__animated animate__bounceInRight" style="--userColor:#FF0000">
<div class="avatar">
<img src="https://static-cdn.jtvnw.net/jtv_user_pictures/a88dd690-f653-435e-ae3f-cd312ee5b736-profile_image-300x300.png">
</div>
<div class="message">
<span class="badges">
<img class="broadcaster" title="broadcaster" src="https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/3"><img class="subscriber" title="subscriber" src="https://static-cdn.jtvnw.net/badges/v1/31966bdb-b183-47a9-a691-7d50b276fc3a/3">
</span>
<span class="name">Blackywersonst</span>
<div class="content">Hello Wolrd</div>
<div class="time">9:15</div>
</div>
</li>
These can then be targeted by css.
.broadcaster {}
.subcriber {}
.reply {}
.highlight {}
.me {}
from streamer.bot-actions.
Sorry for my stupidity, but what would I have to do to make it work to create another template id="message_twitch">?</template another index.hml another themplate.hml
from streamer.bot-actions.
Mh not sure what exactly you want to do. But if you want to have a custom template for mods or subs, that's not possible right now. The only changes you can make are through a css class.
The different templates you see there are just there to support different types of messages, like a youtube message and channel rewards.
They are the "structure" of each message.
You could do something like:
.subscriber {
color: #fff;
background color: green;
}
.moderator {
color: #18181b;
background-color: red;
}
.reply {
color: #18181b;
background-color: aqua;
}
.highlight {
color: #fff;
background-color: purple;
}
It all depends on your HTML and CSS skills.
I will sometimes help if the theme you want is easy to create.
So if you have an image that can better describe your theme, I might be willing to create it for you.
from streamer.bot-actions.
From what I understand, the subscriber variables, for example, if called correctly, can pull different css configurations, that's what I'm trying to execute but without knowing where to go, unfortunately I'm a layman on the subject. I took some screenshots that better exemplify what I'm trying to do.
My chat
broadcaster and moderator
Thank you for your patience and attention.
This is the example that already comes in the buble_ticker theme, I just don't know how to pull this information into the HTML so that when a subscriber types in the chat, he uses this css variation or moderation or the possible variants.
from streamer.bot-actions.
Ohhhh I remember Edu I have this bubble theme for him.
So you are using the bubble theme and you want to change the background of the moderator and moderator is that correct?
Just add the #chat li selector to your example
#chat li.broadcaster {
background-color: #ff000073;
border: 1px solid var(--message-background-color);
}
#chat li.moderator{
background-color: #6dff0073;
border: 1px solid var(--message-background-color);
}
from streamer.bot-actions.
Thank you, you can change other attributes, for example the name.
from streamer.bot-actions.
.name {
color: var(--userColor);
font-weight: bold;
}
from streamer.bot-actions.
But would this change for everyone and not just the correct moderator or channel owner?
from streamer.bot-actions.
Yes this would be for everyone.
This would be for a moderator
#chat li.moderator .name{
}
from streamer.bot-actions.
I did this test but I didn't put the space between the class. F
from streamer.bot-actions.
I want to thank you immensely for your patience and attention. Does the project have a Patreon?
You can close the topic from here I can run my tests.
from streamer.bot-actions.
Your wellcome. No everything is open source from me.
I stream from time to time.
Just come by and say hey and let me know your channel so I can stop by :)
from streamer.bot-actions.
Related Issues (20)
- Streamlabs donation Alerts not working HOT 5
- [Feature] Event list
- [Feature] Information Bar HOT 1
- [Feature] Media Request
- [Game] Wordle HOT 8
- [General Usage Question] Stream Labels HOT 5
- [Bug/Question] is the poll/prediction widget broken
- [Bug] who's that pokemon poll not auto Closing HOT 1
- [Bug] Chat doesnt show Redemptions for custom Text input HOT 6
- [Feature] Overwolf Game Events HOT 3
- [Feature] Wordle - Community Word
- [Feature] Wordle - Word definition
- [Feature] Delete old messages if a new one goes beyond the viewport HOT 5
- streamerbot start with pc how? HOT 2
- [Feature] FFZ emote effects HOT 1
- [Bug] Youtube messages dont hide HOT 3
- [Bug] Rendering a message containing the same emotes results in wrong replacement HOT 5
- Widget Chat not working with YouTube [Bug] HOT 2
- Twitch/YouTube emblem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamer.bot-actions.