Presage

Okay, most of the shit written here is just empty speak so far. But in my opinion, writing this is fairly easy provided I have a clear plan. One weekend I'll sit down and shit something out! And a lot of this shit will move to documentation.

A cute little bot for IRC and Discord.

Features

Motivation

I want to write one cute little application with OTP. Elixir and OTP are pretty cool, wouldn't you say?

Design Overview

Actors

Data Interfaces

User:

MessageInfo:

Message Flow

Permissions

Modules can define guard commands with permissions.

The authorizer checks a user's active permissions.

The permissions module provides dynamic permission assignment.

Command Parsing

Modules leverage OptionParser to parse command arguments. This provides well-documented interfaces and detailed error messages with little extra work.

Configuration

TBD. Should just be standard elixir shit.

Modules

Alias

Note: Alias is not strictly one of the modules; it is more significant. However, to an end user, it appears like a module, so I include it here.

Modifies the command aliases.

Example Usage

blissful | .alias new yell "say --uppercase"
presage  | ".yell" aliased to ".say --uppercase".
blissful | .yell u wot m8
presage  | U WOT M8

Say

Echoes bot output.

Example Usage

blissful | .say hi
presage  | hi

Permissions

Configures per-user permissions. Permissions can be granted globally or for a single cluster.

Example Usage

blissful | .permissions add blissful "alias/delete"
presage  | Gave blissful the permission "alias/delete".
blissful | .alias delete yell
presage  | Deleted the alias ".yell" (was ".say --uppercase").