mads.event

event handling classes.

class Event(*args, **kwargs)[source]

Bases: mads.object.Default

Constructor that initializes a variable with Object() as a default.

add(txt)[source]

say something on a channel, using the bots available in the fleet.

announce(txt)[source]

announce on all fleet bots.

default = ''
direct(txt)[source]

output txt directly.

dispatch()[source]

dispatch based on the provided event.

display(obj=None, keys=[], txt='', direct='')[source]

display the content of an objectect.

handle()[source]

handle an event.

join(*args, **kwargs)[source]

join threads started while handling this event.

ok(txt='')[source]

reply with ‘ok’.

parse(txt='')[source]
reply(txt)[source]

give a reply to the origin of this event.

say_id(id, channel, txt)[source]

say something to id on fleet bots.

show()[source]

show the event on the server is originated on.

wait(sec=None)[source]

wait for event to finish.

class Parsed(*args, **kwargs)[source]

Bases: mads.object.Default

Parsed contains all the arguments that are _parsed from an event.

clear()[source]
default = ''
parse(txt)[source]

parse provided text or available self.txt and determine cmnd, args, rest and other values. Adds a _parsed object to the event.