Skip to main content

Errbot is a chatbot designed to be simple to extend with plugins written in Python.

Project description

https://errbot.readthedocs.org/en/latest/_static/errbot.png

https://github.com/errbotio/errbot/workflows/Python%20package/badge.svg Latest Version License Join the chat at https://gitter.im/errbotio/errbot

Note: This is a forked version of Errbot. The main reason was, to be able to have an automated release process and release the changes often. The base for this fork was version 6.1.9 (commit: 7609f6c) from June 2023. The first released version here is 7.0.0 and contains all unreleased changes up to commit 0080eff1324930207f021f55674d5240abae172d from 2023-10-30.

Errbot

Errbot is a chatbot. It allows you to start scripts interactively from your chatrooms for any reason: random humour, chatops, starting a build, monitoring commits, triggering alerts…

It is written and easily extensible in Python.

Errbot is available as open-source software and released under the GPL v3 license.

Features

Chat servers support

Built-in

With add-ons

Administration

After the initial installation and security setup, Errbot can be administered by just chatting to the bot (chatops).

  • install/uninstall/update/enable/disable private or public plugins hosted on git

  • plugins can be configured from chat

  • direct the bot to join/leave Multi User Chatrooms (MUC)

  • Security: ACL control feature (admin/user rights per command)

  • backup: an integrated command !backup creates a full export of persisted data.

  • logs: can be inspected from chat or streamed to Sentry.

Developer features

  • Very easy to extend in Python! (see below)

  • Presetup storage for every plugin i.e. self['foo'] = 'bar' persists the value.

  • Conversation flows to track conversation states from users.

  • Webhook callbacks support

  • supports markdown extras formatting with tables, embedded images, links etc.

  • configuration helper to allow your plugin to be configured by chat

  • Text development/debug consoles

  • Self-documenting: your docstrings become help automatically

  • subcommands and various arg parsing options are available (re, command line type)

  • polling support: your can setup a plugin to periodically do something

  • end to end test backend

  • card rendering under Slack

Community and support

If you have:

You can also ping us on Twitter with the hashtag #errbot.

Installation

Prerequisites

Errbot runs under Python 3.6+ on Linux, Windows and Mac. For some chatting systems you’ll need a key or a login for your bot to access it.

Quickstart

We recommend to setup a virtualenv.

  1. Install errbot from pip

  2. Make a directory somewhere (here called errbot) to host Errbot’s data files

  3. Initialize the directory

  4. Try out Errbot in text mode

$ pip install errbot
$ mkdir errbot; cd errbot
$ errbot --init
$ errbot

It will show you a prompt >>> so you can talk to your bot directly! Try !help to get started.

Adding support for a chat system

For the built-ins, just use one of those options telegram, IRC, XMPP with pip, you can still do it after the initial installation to add the missing support for example

$ pip install "errbot[irc]"

For the external ones (Slack, Discord, Gitter, Skype, etc …), please follow their respective github pages for instructions.

Configuration

In order to configure Errbot to connect to one of those chat systems you’ll need to tweak the config.py file generated by errbot –init.

To help you, we have a documented template available here: config-template.py.

Note: even if you changed the BACKEND from the configuration, you can still use errbot -T to test out your instance locally in text mode.

Starting Errbot as a daemon

If all that worked, you can now use the -d (or –daemon) parameter to run it in a detached mode:

errbot --daemon

Interacting with the Bot

After starting Errbot, you should add the bot to your buddy list if you haven’t already. You’ll need to invite the bot explicitly to chatrooms on some chat systems too. You can now send commands directly to the bot!

To get a list of all available commands, you can issue:

!help

If you just wish to know more about a specific command you can issue:

!help command

Managing plugins

You can administer the bot in a one-on-one chat if your handle is in the BOT_ADMINS list in config.py.

For example to keyword search in the public plugin repos you can issue:

!repos search jira

To install a plugin from this list, issue:

!repos install <name of repo>

For example !repos install errbotio/err-imagebot.

Writing plugins

Writing your own plugins is extremely simple. errbot –init will have installed in the plugins subdirectory a plugin called err-example you can use as a base.

As an example, this is all it takes to create a “Hello, world!” plugin for Errbot:

from errbot import BotPlugin, botcmd

class Hello(BotPlugin):
    """Example 'Hello, world!' plugin for Errbot"""

    @botcmd
    def hello(self, msg, args):
        """Return the phrase "Hello, world!" to you"""
        return "Hello, world!"

This plugin will create the command “!hello” which, when issued, returns “Hello, world!” to you. For more info on everything you can do with plugins, see the plugin development guide.

Contribution to Errbot itself

Feel free to fork and propose changes on github

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

errbot_hl-8.0.5.tar.gz (169.5 kB view details)

Uploaded Source

Built Distribution

errbot_hl-8.0.5-py3-none-any.whl (170.8 kB view details)

Uploaded Python 3

File details

Details for the file errbot_hl-8.0.5.tar.gz.

File metadata

  • Download URL: errbot_hl-8.0.5.tar.gz
  • Upload date:
  • Size: 169.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for errbot_hl-8.0.5.tar.gz
Algorithm Hash digest
SHA256 f24fd4f1838de0de818b86aeddd19604c641d9c0f0a1b9f6e04d3b2318a7e389
MD5 6ca09e4d2568c1485681769fdf90a16e
BLAKE2b-256 b48f7307e49f62f84551cb8dd0da6deb418d1de28f83037da97128751d6e35a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for errbot_hl-8.0.5.tar.gz:

Publisher: publish.yml on Hapag-Lloyd/errbot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file errbot_hl-8.0.5-py3-none-any.whl.

File metadata

  • Download URL: errbot_hl-8.0.5-py3-none-any.whl
  • Upload date:
  • Size: 170.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for errbot_hl-8.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 698cf8750e022f2621e0dc5775fe312c0b710f3fd0231d35f49acd72738a30bd
MD5 6cb7f108482fa5199403150df653046d
BLAKE2b-256 0bfdd293cff04e4c74be49eb7099d3a865beba8dcd51b9581a44b7795b396682

See more details on using hashes here.

Provenance

The following attestation bundles were made for errbot_hl-8.0.5-py3-none-any.whl:

Publisher: publish.yml on Hapag-Lloyd/errbot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page