kameloso.plugins.oneliner

The Oneliner plugin serves to provide custom commands, like !vods, !youtube, and any other static-reply !command (provided a prefix of "!").

More advanced commands that do more than just repeat the preset lines of text will have to be written separately.

Members

Classes

OnelinerPlugin
class OnelinerPlugin

The Oneliner plugin serves to listen to custom commands that can be added, modified and removed at runtime. Think !info, !vods and !socials.

Functions

handleAddToOneliner
void handleAddToOneliner(OnelinerPlugin plugin, IRCEvent event, string slice, string verb)

Adds or inserts a line into a oneliner, or modifies an existing line.

handleAliasOneliner
void handleAliasOneliner(OnelinerPlugin plugin, IRCEvent event, string slice)

Creates or deletes an alias of an existing oneliner.

handleDelFromOneliner
void handleDelFromOneliner(OnelinerPlugin plugin, IRCEvent event, string slice)

Deletes a oneliner entirely, alternatively a line from one.

handleModifyOneliner
void handleModifyOneliner(OnelinerPlugin plugin, IRCEvent event, string slice)

Modifies an existing oneliner.

handleNewOneliner
void handleNewOneliner(OnelinerPlugin plugin, IRCEvent event, string slice)

Creates a new and empty oneliner.

initResources
void initResources(OnelinerPlugin plugin)

Reads and writes the file of oneliners and administrators to disk, ensuring that they're there and properly formatted.

listCommands
void listCommands(OnelinerPlugin plugin, IRCEvent event, bool includeAliases, string slice)

Lists the current commands to the passed channel.

loadOneliners
void loadOneliners(OnelinerPlugin plugin)

Loads oneliners from disk.

newOnelinerImpl
void newOnelinerImpl(OnelinerPlugin plugin, string channelName, string trigger, Oneliner.OnelinerType type, uint cooldownSeconds, string alias_)

Creates a new and empty oneliner.

onCommandCommands
void onCommandCommands(OnelinerPlugin plugin, IRCEvent event)

Sends a list of the current oneliners to the channel.

onCommandModifyOneliner
void onCommandModifyOneliner(OnelinerPlugin plugin, IRCEvent event)

Adds, removes or modifies a oneliner, then saves the list to disk.

onOneliner
void onOneliner(OnelinerPlugin plugin, IRCEvent event)

Responds to oneliners.

onWelcome
void onWelcome(OnelinerPlugin plugin)

Populate the oneliners array after we have successfully logged onto the server.

reload
void reload(OnelinerPlugin plugin)

Reloads oneliners from disk.

saveResourceToDisk
void saveResourceToDisk(Oneliner[string][string] aa, string filename)

Saves the passed resource to disk, but in JSON format.

selftest
auto selftest(OnelinerPlugin plugin, Selftester s)

Performs self-tests against another bot.

sendOneliner
void sendOneliner(OnelinerPlugin plugin, IRCEvent event, string message)

Sends a oneliner reply.

Structs

Oneliner
struct Oneliner

Oneliner definition struct.

OnelinerSettings
struct OnelinerSettings

All Oneliner plugin runtime settings.

See Also

Meta