errbot.core_plugins.chatRoom module

class errbot.core_plugins.chatRoom.ChatRoom(bot, name=None)[source]

Bases: errbot.botplugin.BotPlugin


Triggered when the bot has successfully connected to the chat network.

Override this method to get notified when the bot is connected.


Triggered on every message not coming from the bot itself.

Override this method to get notified on ANY message.

Parameters:message – representing the message that was received.
connected = False

Triggered on plugin deactivation.

Override this method if you want to do something at tear-down phase (don’t forget to super().deactivate()).

room_create(message, args)[source]

Create a chatroom.

Usage: !room create <room>

Examples (XMPP): !room create example-room@chat.server.tld

Examples (IRC): !room create #example-room

room_destroy(message, args)[source]

Destroy a chatroom.

Usage: !room destroy <room>

Examples (XMPP): !room destroy example-room@chat.server.tld

Examples (IRC): !room destroy #example-room

room_invite(message, args)[source]

Invite one or more people into a chatroom.

Usage: !room invite <room> <identifier1> [<identifier2>, ..]

Examples (XMPP): !room invite room@conference.server.tld bob@server.tld

Examples (IRC): !room invite #example-room bob

room_join(message, args)[source]

Join (creating it first if needed) a chatroom.

Usage: !room join <room> [<password>]

Examples (XMPP): !room join example-room@chat.server.tld !room join example-room@chat.server.tld super-secret-password

Examples (IRC): !room join #example-room !room join #example-room super-secret-password !room join #example-room “password with spaces”

room_leave(message, args)[source]

Leave a chatroom.

Usage: !room leave <room>

Examples (XMPP): !room leave example-room@chat.server.tld

Examples (IRC): !room leave #example-room

room_list(message, args)[source]

List chatrooms the bot has joined.

Usage: !room list

Examples: !room list

room_occupants(message, args)[source]

List the occupants in a given chatroom.

Usage: !room occupants <room 1> [<room 2> ..]

Examples (XMPP): !room occupants room@conference.server.tld

Examples (IRC): !room occupants #example-room #another-example-room

room_topic(message, args)[source]

Get or set the topic for a room.

Usage: !room topic <room> [<new topic>]

Examples (XMPP): !room topic example-room@chat.server.tld !room topic example-room@chat.server.tld “Err rocks!”

Examples (IRC): !room topic #example-room !room topic #example-room “Err rocks!”