errbot.backends.null module

class errbot.backends.null.ConnectionMock[source]

Bases: object

send(msg)[source]
send_message(msg)[source]
class errbot.backends.null.NullBackend(*args, **kwargs)[source]

Bases: ErrBot

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

Those arguments will be directly those put in BOT_IDENTITY

build_identifier(strrep)[source]
build_reply(msg, text=None, private=False, threaded=False)[source]

Should be implemented by the backend

change_presence(status: str = 'online', message: str = '') None[source]

Signal a presence change for the bot. Should be overridden by backends with a super().send_message() call.

conn = <errbot.backends.null.ConnectionMock object>
connect()[source]

Connects the bot to server or returns current connection

property mode
prefix_groupchat_reply(message, identifier)[source]

Patches message with the conventional prefix to ping the specific contact For example: @gbin, you forgot the milk !

query_room(room)[source]

Query a room for information.

Parameters:

room – The room to query for.

Returns:

An instance of Room.

rooms()[source]

Return a list of rooms the bot is currently in.

Returns:

A list of Room instances.

running = True
serve_forever()[source]

Connect the back-end to the server and serve forever.

Back-ends MAY choose to re-implement this method, in which case they are responsible for implementing reconnection logic themselves.

Back-ends SHOULD trigger connect_callback() and disconnect_callback() themselves after connection/disconnection.

shutdown()[source]