Comments (6)
OK, well twitch IRC certainly doesn't use any standard colour codes as documented in other irc server/clients.
I found this https://dev.twitch.tv/docs/irc
and tried something like this
$this->send_text_to_server('bot', '@color=#0D4200 PRIVMSG ' . $channel . ' :' . $message);
But it doesn't seem to do anything...
from twitch-chat-bot-php.
Will do, I will close this now!
from twitch-chat-bot-php.
hi!
unfortunately no, i haven't spent any time towards that direction. i did some sniffing now to a channel, and here are my findings:
- font color: you can add the "/me" prefix to the message. The nightbot is doing it somehow differently, i could see in the log some "binary" chars, displayed with ^A below:
:[email protected] PRIVMSG #streamer_channel :Sogomn -> The command "!score" has been edited successfully.
:[email protected] PRIVMSG #streamer_channel :^AACTION hugs Sogomn^A
:[email protected] PRIVMSG #streamer_channel :^AACTION pushes sogom away^A
:[email protected] PRIVMSG #streamer_channel :BacT's worst nightmare
- Background color, you mean the message sent out from Twitch about new sub notification? the only message i captured from the bot is a USERNOTICE message:
:tmi.twitch.tv USERNOTICE #streamer_channel :I wanted to sub to Daut, don't know what happened
the rest of the message (username subbed for X months) doesnt appear captured, i guess its not sent via IRC?
hope these help!
from twitch-chat-bot-php.
yes, i read the link you provided, and seems these are IRC v3 tags, and require "elevation" during initial connect.
CAP REQ :twitch.tv/tags
i added this command to the _login_to_twitch()
function, i made a few attempts with the provided example for PRVMSG scenario, but didn't succeed to see it working. tag syntax you provided seems correct, but probably need to populate more fields. if you want to inspect further, modify login_to_twitch function:
$this->send_text_to_server('service', 'PASS ' . $this->oath_pass);
usleep(1000000);
$this->send_text_to_server('service', 'NICK ' . $this->nickname);
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/membership');
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/commands');
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/tags');
usleep(1000000);
$this->send_text_to_server('service', 'JOIN ' . $this->channel);
$this->logger->log_it('INFO', CLASS, FUNCTION, 'Login commands were sent. Bot is ready.');
//
return TRUE;
open the logs and you will see examples of the command syntax
hope it helps, please ping if you get any luck with it !
from twitch-chat-bot-php.
Well this is frightfully frustrating. I guess it is not possible to set the IRCv3 tags from the client.
I tried this for example:
$this->send_text_to_server('bot', '@badges=moderator/1;color=#FF0000;display-name=mybot;emote-sets=0;mod=1;subscriber=0;user-type=mod;user-type= :[email protected] PRIVMSG ' . $channel . ' :' . $message);
But then I see no response at all. The closest I have come is:
$this->send_text_to_server('bot', 'PRIVMSG ' . $channel . ' :/color red');
$this->send_text_to_server('bot', 'PRIVMSG ' . $channel . ' :/me ' . $message);
Which changes the client (bot) colour and then uses /me as you first suggested - but it's a pretty stoopid way of doing it if you ask me...
from twitch-chat-bot-php.
from twitch-chat-bot-php.
Related Issues (14)
- I guess it's dead HOT 3
- Online Bot HOT 2
- How can we integrate bot to multiple chat? HOT 3
- API call to get returned with error HOT 2
- Do I have to add the "oauth:" part of the token HOT 1
- Error on https HOT 1
- Get information if user is subscriber or not HOT 3
- run on webserver HOT 1
- Any way to add vips with the bot? HOT 10
- VIPS don't earn loyalty points HOT 1
- Processing Messages HOT 3
- Requirement of PHP version? HOT 3
- Add Admin HOT 1
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 twitch-chat-bot-php.