addPrefix

Adds a prefix to a command word; the command prefix if the passed policy is kameloso.plugins.common.PrefixPolicy.prefixed, the bot nickname if it is kameloso.plugins.common.PrefixPolicy.nickname, and as is if it is kameloso.plugins.common.PrefixPolicy.direct.

version(WithHelpPlugin)
private
addPrefix

Parameters

plugin HelpPlugin

The current HelpPlugin.

word string

Command word to add a prefix to.

policy PrefixPolicy

The prefix policy of the command word relates to.

Return Value

Type: auto

The passed word, optionally with a prefix prepended.