kaguya v0.4.4 API Reference
Modules
Top level module responsible for starting the bot properly
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
Struct representation of an IRC user. It has three fields, nick, name, and rdns. rdns is just the final part of the prefix, it’s sometimes known as host or vhost
The supervisor of the Core of Kaguya. It mainly exists to be proc’d by Core on :tcp_closed so that the Core can restart itself
Module which provides functionality used for creating IRC modules
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