
This sub-action is useful if you want to output a list of commands to your chat.
AnywhereU0JBRR+LCAAAAAAABAC1WFtz6jgSfp+q+Q9sXndI+QIHPFXzgJ3gGBJOuF+W8yBLwjjIl/UFMFPnv2/LxmCDkzq7VZsqV7C61d36vlZbrb9//61We3BohB7+rP3NX+DVRQ6F1wedRjXNcxzkkrD2fESOz2htGiKLPvxxVkVxtPUCrjyOAgrzgkfTiy7iPQ1C23O5XHyUHoWLgNAQB7YfnYVjn9lRWMOZsxqzw6gWeTW092xSo0dMKbFdq+ago+3ETs2hIY+ixqhrRduwGI03it0OPtt1Y8ZymWO7fO7sEhEXctnPVOOBoBIGKLURwsi/spFaLkrFNuFhf5NpS0RKq94mIqo3iKLAL1Outza0LYnNjWJSkgeXTvt3TGNaDiwdpy4yGeU2oyCmJckRs5jQbuA5L4CKFySgtEEs/EzrnbocqyqtKl5L4VmBF/tco1KK2AElIeBbZTsAdc+5IH8nx56L4yCgblQljQLbsoCZItw3kJ+tpHEZKfpmu4XIBit1GSmk3mjLuI6kDalvGoRuZCo2WxtUXECBOETbImoLSp2iplBvbES53m4gVKcibn0TCUIUte6mRonP4WsI4q3kU/qu5IR5Nv0oSn9eX34U8Qhjs3OfgFWIpJQNzsR2GLuLeo8Cm0eX6+AKajNk3DSHuI17hjINy/UCULBRSMPPlLYofKeBY4fnbVaFSEZCkzTMJlHEOqImkNDatOtKU/lWlxWCZdQSmrQp30V5oLa15TkkPAqfECQKonwr8hFPvTRvbvZeRtGXBNouoUduuETdH1/Rkm+1u/hvCt+dPKAbCqFiesd8Ktb+XK/nEI93CNfrNxsHXuhtosfB82S97gbg9OAFu2+N9XrfeBQeZUEWlfXaCbEXMNt8JMBt2eSPW/9mElHNI2nwZDHwTQdbU5mdiD6Lvh+E/u3Y626wN/UjW8oj35Sap9cdYaYzS9D8rfU09Aaaq4pL5+gvE/XD1LsnnKhP0+dtz4Qx05mCPBxodscyNPVA5r0Q5llLR9mbmtql+uyDLEasr+1yHW4T/nfOT3tvdEceWr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136lW9K6P2tlx1DagPO+goV6CwvNeqMhtetmsw2vCpFajXariVr3vcAvHEMV/vd/OYdKv9JCYI8x5IeU6LxDKLce5zm5ftaWZir50KVN+KQB9vkZP4oomYbnvq3k/SIueC/K7f+pg7scq1/5BUFnj2zG8apuZq9Y3rWb51anot12sqOvUEYytc79/qOqe4Izu0WPz0ef2diONORHcVCVlg/Mw+h88C85yPoq1Ys6GHtx2iHfxpWpGG5EAxexCoXQi4OsaRBveAgBK42bpUFVUGcNTuMXWhhavjF1Qzuy95Vrs5hnIqZ5HoPe5G6FcWq9Wna5dLi5ikBuNMl2kvBZ3h6oGXp4R6MxDfY3aXgVasyGPVcWRraT6xfugK7XVVLWQULv7nsBpDG/WclusYRHMQv0/kYplQp1xPwtAq3ff/v5HyV2GVNfEwAASince Twitch has a message character limit of 500 and on YouTube it's 200 you may find your commands overtake this amount therefore the code below can help with splitting the list into batches of commands that fit inside the messages.
using System;
using System.Collections.Generic;
public class CPHInline
{
public bool Execute()
{
// This is when the Variable Name in the Get Commands Sub-Action is `commands`
CPH.TryGetArg("commandsList", out List<string> commands);
// Limit is 500 on Twitch, 200 on YouTube.. I took a few off as a safety measure.
const int maxMessageLength = 495;
string message = "Commands Avaliable to you: ";
const string additionalCommandsMessage = "Addional Commands for you: ";
const string commandSeparator = ", ";
const bool sendFromBot = false;
int commandsSent = 0;
while (commandsSent < commands.Count)
{
int currentMessageLength = message.Length;
bool fitsInMessage(string text) => currentMessageLength + text.Length < maxMessageLength;
List<string> commandsForMessage = [];
for (int i = commandsSent; i < commands.Count && fitsInMessage(commands[i]); i++)
{
commandsForMessage.Add(commands[i]);
currentMessageLength += commands[i].Length + commandSeparator.Length;
}
message += string.Join(commandSeparator, commandsForMessage);
// if you wish to send the message to Youtube, use CPH.SendYouTubeMessage(message, sendFromBot);
CPH.SendAction(message, sendFromBot);
commandsSent += commandsForMessage.Count;
message = additionalCommandsMessage;
}
return true;
}
}
All
The command group to get commands from. Use "All" to get commands from all groups.
The variable name to store the resulting commands in.
false
Include all commands regardless of their Include option checked or not.
false
Only get commands for which the user has permissions.
false
When checked it will only use the first command alias you have defined in the command settings.
| Name | Type | Description |
|---|---|---|
Example Value: !shoutout,!followage,!banComma-separated string containing all commands matching your specified criteria | ||
C# List object containing all commands matching your specified criteria | ||
Variables generated by all triggers and available within all action executions. |
public List<CommandData> GetCommands()