newOnelinerImpl

Creates a new and empty oneliner.

Uses defer to defer the creation to the main thread, so that it can supply the list of existing commands across all plugins and abort if the new trigger word would conflict with one.

version(WithOnelinerPlugin)
private
void
newOnelinerImpl
(,
const string channelName
,
const string trigger
,,
const uint cooldownSeconds
,
const string alias_ = string.init
)

Parameters

plugin OnelinerPlugin

The current OnelinerPlugin.

channelName string

Name of the channel to create the oneliner in.

trigger string

Trigger word for the oneliner.

type Oneliner.OnelinerType

OnelinerType of the oneliner.

cooldownSeconds uint

Cooldown in seconds for the oneliner.

alias_ string

Optional alias of another oneliner.