saveResourceToDisk

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

This is used with the associative arrays for oneliners.

version(WithOnelinerPlugin)
private
void
saveResourceToDisk
(
const Oneliner[string][string] aa
,
const string filename
)

Parameters

aa Oneliner[string][string]

The JSON-convertible resource to save.

filename string

Filename of the file to write to.

Examples

plugin.oneliners["#channel"]["asdf"].responses ~= "asdf yourself";
plugin.oneliners["#channel"]["fdsa"].responses ~= "hirr";

saveResource(plugin.onelinersByChannel, plugin.onelinerFile);