Connect to a ssh with a root or similar account on your AlmaLinux :
dnf install epel-release
dnf module enable nodejs:20
dnf install nodejs -y
dnf install chromium -y
dnf install git -y
node -v
With your ssh session :
cd /var
mkdir nodejs
cd nodejs
git clone https://github.com/AlexiaGossa/wizebot-chat-history
cd wizebot-chat-history
npm i puppeteer
npm install puppeteer-core
npm install -g npm
Go to your wizebot.tv admin panel
Open Widgets (overlays)
Open Widget chatbot
Create a new widget
Select the clean (on the right side) template
Import the following HTML code into the Wizebot HTML part :
<link href="https://fonts.googleapis.com/css?family=Inter" rel="stylesheet">
<div class="template message_div animated fadeIn">
<div>
<div class="sticker" style="background-color:{user_color};"></div>
<div class="time">{message_time}</div>
<div class="badges"></div>
<div class="nicksimple">{user_display_name}</div>
<div class="nick"></div>
<div class="left"></div>
<div class="message" msgtype="{message_type}"></div>
</div>
</div>
<div id="messagescontainer">
<div id="messages" dir="ltr"></div>
</div>
<!-- Horizontal order : dir="ltr" = Left to right / dir="rtl" = Right to left -->
<!-- TAGs available : {user_name} {user_display_name} {user_name_full} (Display name + Username) {user_color} {user_invert_color} (For background ?) {user_badges} {message_text} {message_time} {message_type} {message_color} (For announcement type) -->
Clear the CSS code in the Wizebot CSS part
Change the channel name in the Javascript code in the Wizebot JAVASCRIPT part to your channel name
For my Twitch channel, I use : var channel_name = "alexia_vassiliki";
Click on "Copy the link" on the top of the Wizebot web page
With your ssh session, open the wizebot-url.txt with nano nano wizebot-url.txt
and paste the link into nano.
Now you could modify the CSS file named wizebot-inject.css to apply your own design.
Don't forget to restart the nodeJS script after each modification.
Open 1 or 2 TCP ports on your system :
8080 for HTTP
8443 for HTTPS if you provide some certs
You want to execute the wizebot-chat-history script now ?
Run the command : node wizebot-node.js
You'll see the following text :
HTTP server started
Running...
Press CTRL+C to stop the script.
With your ssh session :
chmod +x wizebot-run.sh
We add the script into cron at startup, this command edit the cron with vim :
crontab -e
And adding the following line into the cron
@reboot sh /var/nodejs/wizebot-chat-history/wizebot-run.sh > /var/nodejs/wizebot-chat-history/wizebot-run.log
Note : If you prefer edit the cron with nano instead of vim
export VISUAL=nano
Or reselect VIM
export VISUAL=vim
We assume the script is running on a system using the IP 192.168.1.126 and using the HTTP 8080 port.
There is 2 parameters : height and heightcolor :
height is chatbot text area in percents.
heightcolor is flat area color using a rgb value.