tmi-cluster
tmi-cluster copied to clipboard
Proof of Concept - Multi-Tenancy
Motivation
I have now received feedback from several people that users should be able to change the bot username.
ETA: The plan is to start this proof of concept in Q2/Q3 2022.
Task
In the first prove of concept I would suggest to implement it like this:
- The chabot will still enter the chat as a default bot account (eg.
bot_username
). - Messages will be sent with the specified bot account (eg.
streamer_username
). - By default the TMI-Cluster will still continue to use the default bot account.
- It is only possible to define one bot account per channel.
Background of POC
Adding another bot account as a listener of chat messages puts a considerable load on the TMI cluster in terms of resources. Therefore, I suggest that the chatbot continues to join the channels with the current default bot account so that this problem is migrated.
In other words: Users only recognize that, for example, bot_username
is in the chat, but will reply with streamer_username
.
Updated Documentation
Sending Messages via TMI-Cluster
You can send a message within the laravel ecosystem at any time, you don't even need to have the TMI cluster connected in the target chat. The messages are processed async via the TMI cluster queue. You can define the bot_id
attribute within the ChannelManager
to override the message sender.
use GhostZero\TmiCluster\Facades\TmiCluster;
TmiCluster::sendMessage('ghostzero', 'Hello World!');
Current Documentation: https://tmiphp.com/docs/tmi-cluster.html#sending-messages-via-tmi-cluster