Commands Overview
Twitcher provides a powerful, node-based system for creating and managing chat commands. Instead of writing complex parsers, you can add different types of command nodes to your scene, configure them in the Inspector, and connect to their signals.
All command nodes inherit from a common TwitchCommandBase, giving them a shared foundation for handling permissions, cooldowns, and location (chat/whisper).
C# note
Every command type below is available from C# too: each page has a GDScript/C# tab on its code examples. In C#, TwitchCommandBase is an abstract class with a PermissionFlag/WhereFlag enum and CommandReceived/ReceivedInvalidCommand/InvalidPermission/Cooldown events shared by all command types, same as in GDScript.
Types of Command Nodes
- TwitchCommand: The standard, prefix-based command (e.g.,
!hello). This is the most common type of command. - TwitchCommandRegex: Triggers based on a regular expression match within a message. Powerful for extracting specific patterns.
- TwitchCommandContains: Triggers if a message contains specific keywords or phrases. A simpler alternative to regex for keyword detection.
- TwitchCommandHelp: A specialized command that automatically generates a help message listing other available commands.
- TwitchCommandRespond: Not a command type on its own — add it as a child of any command node above to reply with a fixed message when that command triggers, without writing a script.
Key Data Object
- TwitchCommandInfo: A data object passed with every command signal, providing essential context about the event, such as the user, channel, and original message.