kameloso.plugins.note

The Note plugin allows for storing notes to offline users, to be replayed when they next join the channel.

If a note is left in a channel, it is stored as a note under that channel and will be played back when the user joins (or optionally shows activity) there. If a note is left in a private message, it is stored as outside of a channel and will be played back in a private query, depending on the same triggers as those of channel notes.

Activity in one channel will not play back notes left for another channel, but anything will trigger private message playback.

Members

Classes

NotePlugin
class NotePlugin

The Note plugin, which allows people to leave messages to each other, for offline communication and such.

Functions

initResources
void initResources(NotePlugin plugin)

Ensures that there is a notes file, creating one if there isn't.

loadNotes
void loadNotes(NotePlugin plugin)

Loads notes from disk into NotePlugin.notes.

onChannelMessage
void onChannelMessage(NotePlugin plugin, IRCEvent event)

Plays back notes upon someone saying something in the channel, provided NoteSettings.playBackOnAnyActivity is set.

onCommandAddNote
void onCommandAddNote(NotePlugin plugin, IRCEvent event)

Adds a note to the in-memory storage, and saves it to disk.

onJoinOrAccount
void onJoinOrAccount(NotePlugin plugin, IRCEvent event)

Plays back notes upon someone joining or upon someone authenticating with services.

onTwitchChannelEvent
void onTwitchChannelEvent(NotePlugin plugin, IRCEvent event)

Plays back notes upon someone performing a Twitch-specific action.

onWelcome
void onWelcome(NotePlugin plugin)

Initialises the Note plugin. Loads the notes from disk.

onWhoReply
void onWhoReply(NotePlugin plugin, IRCEvent event)

Plays back notes upon replies of a WHO query.

playbackNotes
void playbackNotes(NotePlugin plugin, IRCEvent event, Flag!"background" background)

Plays back notes. The target is assumed to be the sender of the IRCEvent passed.

playbackNotesImpl
void playbackNotesImpl(NotePlugin plugin, string channelName, IRCUser user, Flag!"background" background)

Plays back notes. Implementation function.

reload
void reload(NotePlugin plugin)

Reloads notes from disk.

saveNotes
void saveNotes(NotePlugin plugin)

Saves notes to disk, to the NotePlugin.notesFile JSON file.

selftest
auto selftest(NotePlugin plugin, Selftester s)

Performs self-tests against another bot.

Structs

Note
struct Note

Embodies the notion of a note, left for an offline user.

NoteSettings
struct NoteSettings

Note plugin settings.

See Also

Meta