Constants used when scheduling API queries.
Returns the next worker thread ID to use, cycling through them.
Override IRCPlugin.isEnabled
(effectively overriding IRCPluginImpl.isEnabled) and inject a server check, so this plugin only works on Twitch, in addition to doing nothing when TwitchSettings.enabled is false.
Takes one or more lines from the passed buffer and sends them to the server as whispers.
The Twitch application ID for the kameloso bot.
How many times to retry a Twitch server query.
Contained state of a channel, so that there can be several alongside each other.
Aggregate of values and state needed to rate-limit outgoing messages.
Transient state variables, aggregated in a struct.
Custom channel-specific BetterTTV, FrankerFaceZ and 7tv emotes, as fetched via API calls.
Custom global BetterTTV, FrankerFaceZ and 7tv emotes, as fetched via API calls.
Emote counters associative array; counter longs keyed by emote ID string keyed by channel.
File to save emote counters to.
Associative array of responses from async HTTP queries.
Array of active bot channels' state.
API keys and tokens, keyed by channel.
File to save API keys and tokens to.
File to save stream history to.
The throttle instance used to rate-limit outgoing whispers.
Transient state of this TwitchPlugin instance.
All Twitch plugin settings.
Associative array of viewer times; seconds keyed by nickname keyed by channel.
File to save viewer times to.
Buffer of messages to send as whispers.
Flag denoting that IRCPluginImpl has been mixed in.
Namespace for the alias sequences of all event handler functions in this module, as well as the one of all IRCEventHandler annotations in the module.
Judges whether an event may be triggered, based on the event itself and the annotated required Permissions of the handler in question. Wrapper function that merely calls kameloso.plugins.common.allowImpl. The point behind it is to make something that can be overridden and still allow it to call the original logic (below).
Forwards the supplied IRCEvent to IRCPluginImpl.onEventImpl.
Pass on the supplied IRCEvent to module-level functions annotated with an IRCEventHandler, registered with the matching IRCEvent.Types.
Basic constructor for a plugin.
Lets a plugin modify an IRCEvent while it's begin constructed, before it's finalised and passed on to be handled.
Writes plugin resources to disk, creating them if they don't exist.
Loads configuration for this plugin from disk.
Change a plugin's Settings-annotated settings struct member by their string name.
Prints the plugin's Settings-annotated settings struct.
Gathers the configuration text the plugin wants to contribute to the configuration file.
Tick function. Called once every main loop iteration.
Self-test function.
Returns the name of the plugin. (Technically it's the name of the module.)
Compile a list of our a plugin's oneliner commands.
Forwards to IRCPluginImpl.commandsImpl.
Collects all IRCEventHandler.Command command words and IRCEventHandler.Regex regex expressions that this plugin offers at compile time, then at runtime returns them alongside their descriptions and their visibility, as an associative array of IRCPlugin.CommandMetadatas keyed by command name strings.
Proxies a bus message to the plugin, to let it handle it (or not).
Metadata about a IRCEventHandler.Command- and/or IRCEventHandler.Regex-annotated event handler.
An IRCPluginState instance containing variables and arrays that represent the current state of the plugin. Should generally be passed by reference.
Allows a plugin to modify an event post-parsing.
Called to let the plugin react to a new event, parsed from the server.
Called when the plugin is requested to initialise its disk resources.
Reads serialised configuration text into the plugin's settings struct.
Called to let the plugin contribute settings when writing the configuration file.
Called when we want to change a setting by its string name.
Called at program start but before connection has been established.
Called when we want a plugin to print its Settings-annotated struct of settings.
Called during shutdown of a connection; a plugin's would-be destructor.
Returns the name of the plugin.
Returns an array of the descriptions of the commands a plugin offers.
Returns an array of the descriptions of the channel-specific commands a plugin offers.
Reloads the plugin, where such is applicable.
Called when a bus message arrives from another plugin.
Returns whether or not the plugin is enabled in its settings.
Called on each iteration of the main loop.
Called when the plugin is first loaded.
Performs self-tests against another bot.
The Twitch plugin is an example Twitch streamer bot. It contains some basic tools for streamers, and the audience thereof.