kaguya v0.1.3 API Reference

Modules

Begins the execution of the bot

Channel GenServer, with a few utility functions for working with channels. As a GenServer, it can be called in the following ways:

  • {:send, message}, where message is the message to be sent to the channel
  • {:set_user, nick_string}, where the nick string is a nick with the mode prefix(+, @, etc.)
  • {:get_user, nick}, where nick is the nick of the user to be returned. The Kaguya.Channel.User struct is returned
  • {:del_user, nick}, where nick is the nick of the user to be deleted

Representation of a user in a channel

The channel supervisor. It uses a simple_one_for_one format, with transient restarts

The core socket handler of the bot. It listens for raw messages from the IRC server, parses them, then dispatches the message. It also takes serialized messages and converts them into raw strings and sends them to the IRC server

Representation of an IRC message in struct form. The trailing argument is the final argument, separated for convenience

Module which handles message parsing from struct to raw form and vice versa

Representation of an IRC user

When this module is used, it will create wrapper functions which allow it to be automatically registered as a module and include all macros. It can be included like: use Kaguya.Module, "module name here"

Core builtin functions necessary for the bot to be function. This module is always loaded into the bot

Module supervisor. It runs all modules specified in the :modules configuration option for :kaguya