Package: errbot
ErrbotErrbot 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.FeaturesChat servers supportBuilt-inIRC supportTelegram supportXMPP supportWith add-onsSlack support(Seeinstructions)Discord(Seeinstructions)Gitter support(Seeinstructions)Webex(Seeinstructions)Mattermost(Seeinstructions)RocketChat(Seeinstructions)Skype(Seeinstructions)TOX(Seeinstructions)VK(Seeinstructions)Zulip(Seeinstructions)AdministrationAfter 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 gitplugins can be configured from chatdirect 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 featuresVery 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 supportsupportsmarkdown extrasformatting with tables, embedded images, links etc.configuration helper to allow your plugin to be configured by chatText development/debug consolesSelf-documenting: your docstrings become help automaticallysubcommands and various arg parsing options are available (re, command line type)polling support: your can setup a plugin to periodically do somethingend to end test backendcard rendering under SlackCommunity and supportIf you have:a quick question feel free to join us on chat aterrbotio/errbot on Gitter.a plugin development question please useStackoverflowwith the tagserrbotandpython.a bug to report or a feature request, please use ourGitHub project page.You can also ping us on Twitter with the hashtag#errbot.InstallationPrerequisitesErrbot 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.QuickstartWe recommend to setup avirtualenv.Installerrbotfrom pipMake a directory somewhere (here callederrbot) to host Errbot’s data filesInitialize the directoryTry out Errbot in text mode$pipinstallerrbot$mkdirerrbot;cderrbot$errbot--init$errbotIt will show you a prompt>>>so you can talk to your bot directly! Try!helpto get started.Adding support for a chat systemFor the built-ins, just use one of those optionstelegram, IRC, XMPPwith 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.ConfigurationIn order to configure Errbot to connect to one of those chat systems you’ll need to tweak theconfig.pyfile generated
byerrbot –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 useerrbot -Tto test
out your instance locally in text mode.Starting Errbot as a daemonIf all that worked, you can now use the -d (or –daemon) parameter to run it in a
detached mode:errbot--daemonInteracting with the BotAfter 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:!helpIf you just wish to know more about a specific command you can issue:!helpcommandManaging pluginsYou can administer the bot in a one-on-one chat if your handle is in the BOT_ADMINS list inconfig.py.For example to keyword search in the public plugin repos you can issue:!repossearchjiraTo install a plugin from this list, issue:!reposinstall<nameofrepo>For example!repos install errbotio/err-imagebot.Writing pluginsWriting your own plugins is extremely simple.errbot –initwill have installed in thepluginssubdirectory a plugin
callederr-exampleyou can use as a base.As an example, this is all it takes to create a “Hello, world!” plugin for Errbot:fromerrbotimportBotPlugin,botcmdclassHello(BotPlugin):"""Example 'Hello, world!' plugin for Errbot"""@botcmddefhello(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 theplugin development guide.Contribution to Errbot itselfFeel free to fork and propose changes ongithubv6.2.0 (2024-01-01)breaking:backend/slack: remove slack and slack_rtm built-in backends (#1581)core/logging: deprecate SENTRY_TRANSPORT config (#1604)core: removing py37 support (#1652)features:core/plugins: detect plugins using entrypoints (#1590)core/logging: add new SENTRY_OPTIONS config (#1597)core/plugins: make slack, mattermost and discord backends available as install requirements (#1611)fixes:docs: add unreleased section (#1576)docs: update broken URL for Markdown Extra (#1572)chore: bump actions/setup-python version (#1575, #1593, #1609, #1626, #1642, #1650, #1659, #1674)backend/telegram: fix missing imports (#1574)chore: ci improvements (#1577, #1583)chore: add docs build to ci (#1582)backend/xmpp: fix forward type references (#1578)chore: remove campfire references (#1584)chore/setup: fix exception when installing on python <3.7 (#1585)docs: typos (#1589, #1594)chore: simplify isort config using black (#1595)fix: detecting entrypoint module paths (#1603)chore: fix Docker build to use local tree (#1608)chore: bump actions/checkout version (#1610, #1625, #1637, #1644, #1653, #1656, #1658, #1663)docs: link to external Discord plugin documentation (#1615)chore: add ARG to Dockerfile and add proper stop signal (#1613)fix: update module versions and build (#1627)chore: update setuptools version (#1628)refactor: detecting entry point plugins (#1630)chore: bump mr-smithers-excellent/docker-build-push version (#1633)docs: fix example code in the testing section (#1643)chore: update all core dependencies (#1651)fix: use template file for webserver plugin echo output (#1654)chore: update repos.json (#1660)docs: add readthedocs yaml config (#1661)fix: broken integration tests (#1668)style: replace format() with f-strings (#1667)migrate from external mock package to stdlib unittest.mock (#1673)fix: import of Mapping from collections.abc (#1675)backend: update irc, telegram and xmpp dependencies (#1655)v6.1.9 (2022-06-11)features:core: set default backend to Text (#1522)core: option to divert all commands to private or thread (#1528)core: add type hints to core and backend functions (#1542)docs: add ACL and numerous backends to official documentation (#1552)core: add Python 3.10 to automated tests (#1539)core: add room acl attribute (#1530)chore: refactor Dockerfile errbot install and python version bump (#1571)fixes:core: success handling for update_repos (#1520)core/plugins: cascade dependency plugins (#1519)core/plugins: reload all repo plugins when updating a repo (#1521)plugin_manager: correct syntax error (#1524)backend/text: add stub send_stream_request method (#1527)backend/hipchat: remove HipChat backend (#1525)backend/test: shutdown sequence to address test failure (#1535)core: various minor logging improvements (#1536)chore: various minor formatting improvements (#1541)docs: update spark plugin reference (#1546)fix: python 2 version references in docs and init template (#1543)backends: deprecate built-in Slack and SlackRTM (#1526)chore: remove python 3.6 checks and test environment (#1540)chore: add/update issue templates (#1554)chore: pin all package dependencies (#1553, #1559)core/webserver: use errbot loglevel for consistent logging. (#1556)fix/core: prevent infinite loop when only BOT_PREFIX is passed (#1557)chore: bump actions/setup-python from 2 to 3.1.0 (#1563)chore: Set permissions for GitHub actions (#1565)fix: removed deprecated argument reconnection_interval for irc v20.0 (#1568)docs: Add Gentoo packages (#1567)chore: bump actions/setup-python from 3.1.0 to 3.1.2 (#1564)fix: circular dependencies error when there are none (#1505)v6.1.8 (2021-06-21)features:core/plugin: method to append argparse options to Command object (#1394)backends: Add identifier for room join and room leave callbacks (#1500)backends/test: allow attachments to pytest messages as extras (#1489)core/acl: Add allowargs / denyargs filters to ACL (#1509)core/bootstrap: Small logging fixes to BOT_LOG_FILE and FORMATTER (#1513)core/plugin: Support room names with spaces (#1262)fixes:core/cli: failure when passing relative directory during –init (#1511)backend/xmpp: include message delayed for send/received messages (#1270)backend/xmpp: “unexpected keyword argument ‘wait’” when connecting (#1507)docs: update broken readme link to plugin development docs (#1504)close threadpool on exit (#1486)docs: remove matrix link (#1502)docs: Update backend screenshots (#1499)docs: Remove Google+ references (#1497)core: Split messages usingsplit()instead of whitespace (#1496)chore/plugin: whoami formatting (#1459)backend/GUI: Remove GUI backend (#1495)v6.1.7 (2020-12-18)features:core: Add support for python3.9 (#1477)chore: Allow dependabot to check GitHub actions weekly (#1464)chore: Add Dockerfile (#1482)fixes:core: AttributeError on Blacklisted plugins (#1369)chore: Remove travis configuration (#1478)chore: minor code cleanup (#1465)chore: Use black codestyle (#1457, #1485)chore: Use twine to check dist (#1485)chore: remove codeclimate and eslint configs (#1490)v6.1.6 (2020-11-16)features:core: Update code to support markdown 3 (#1473)fixes:backends: Set email property as non-abstract (#1461)SlackRTM: username to userid method signature (#1458)backends: AttributeError in callback_reaction (#1467)docs: webhook examples (#1471)cli: merging configs with unknown keys (#1470)plugins: Fix error when plugin plug file is missing description (#1462)docs: typographical issues in setup guide (#1475)refactor: Split changelog by major versions (#1474)v6.1.5 (2020-10-10)features:XMPP: Replace sleekxmpp with slixmpp (#1430)New callback for reaction events (#1292)Added email property foriPerson object on all backends (#1186, #1456)chore: Add github actions (#1455)fixes:Slack: Deprecated method calls (#1432, #1438)Slack: Increase message size limit. (#1333)docs: Remove Matrix backend link (#1445)SlackRTM: Missing ‘id_’ in argument (#1443)docs: fixed rendering with double hyphens (#1452)cli: merging configs via--storage-mergeoption (#1450)v6.1.4 (2020-05-15)fixes:403 error when fetching plugin repos index (#1425)v6.1.3 (2020-04-19)features:Add security linter (#1314)Serve version.json on errbot.io and update version checker plugin (#1400)Serve repos.json on errbot.io (#1403, #1406)Include SlackRTM backend (beta) (#1416)fixes:Make plugin name clashes deterministic (#1282)Fix error with Flows missing descriptions (#1405)Fix!repos updateobject attribute error (#1410)Fix updating remove repos using!repos update(#1413)Fix deprecation warning (#1423)Varios documentation fixes (#1404, #1411, #1415)v6.1.2 (2019-12-15)fixes:Add ability to re-run –init safely (#1390)fix #1375 by managing errors on lack of version endpoint.Fixed a deprecation warning for 3.9 on Mapping.removing the intermediate domain requiring a certificate.Fix package name for sentry-sdk flask integrationAdd support to sentry FlaskIntegrationMigrate from raven (deprecated) to new sentry-sdkfix: Log errors when presentMake chatroom log more descriptiveSet admin check log as debugAdd admin warnings to logFix: Advanced loop graph does not reflect the imagemake the TestBot start timeout parameterizederrbot/plugin_manager: only check for /proc/1/cgroup if path exists to fix warningremoved (c) Apple asset we completely missed.fix double threading in slack backend if DIVERT_TO_THREAD is usedpop up the timeout for travisMakes the timeout feedback better on tests. (#1366)Move all tox environments to use py37 (#1342)Remove empty “text” body on Slack send_card (#1336)Load class source in reloading plugins (#1347)test: Rename assertCommand -> assertInCommand (#1351)Enforce BOT_EXTRA_BACKEND_DIR is a list type. (#1358)Fix #1360 Cast pathlib.Path objects to strings for use with sys.path
(#1361)v6.1.1 (2019-06-22)fixes:Installation using wheel distribution on python 3.6 or olderv6.1.0 (2019-06-16)features:Use python git instead of system git binary (#1296)fixes:errbot-lcli error (#1315)Slack backend by pinning slackclient to supported version (#1343)Make –storage-merge merge configs (#1311)Exporting values in backup command (#1328)Rename Spark to Webex Teams (#1323)Various documentation fixes (#1310, #1327, #1331)v6.0.0 (2019-03-23)features:TestBot: Implement inject_mocks method (#1235)TestBot: Add multi-line command test support (#1238)Added optional room arg to inroomAdds ability to go back to a previous roomPass telegram message id to the callbackfixes:Remove extra spaces in uptime outputFix/backend import error messages (#1248)Add docker support for installing package dependencies (#1245)variable name typo (#1244)Fix invalid variable name (#1241)sanitize comma quotation marks too (#1236)Fix missing string formatting in “Command not found” output (#1259)Fix webhook test to not call fixture directlyfix: arg_botcmd decorator now can be used as plain methodsetup: removing dnspythonpin markdown <3.0 because safe is deprecatedv6.0.0-alpha (2018-06-10)major refactoring:Removed Yapsy dependencyReplaced back Bottle and Rocket by Flasknew Pep8 complianceadded Python 3.7 supportremoved Python 3.5 supportremoved old compatibility cruftported formats and % str ops to f-stringsStarted to add field types to improve type visibility across the codebaseremoved cross dependencies between PluginManager & RepoManagerfixes:Use sys.executable explicitly instead of just ‘pip’ (thx Bruno Oliveira)Pycodestyle fixes (thx Nitanshu)Help: don’t add bot prefix to non-prefixed re cmds (#1199) (thx Robin Gloster)split_string_after: fix empty string handling (thx Robin Gloster)Escaping bug in dynamic pluginsbotmatch is now visible from the errbot module (fp to Guillaume Binet)flows: hint boolean was not forwardedFix possible event without bot_id (#1073) (thx Roi Dayan)decorators were working only if kwargs were emptyMessage.clone was ignoring partial and flowsfeatures:partial boolean to flag partial mesages (thx Meet Mangukiya)Slack: room joined callback (thx Jeremy Kenyon)XMPP: real_jid to get the jid the users logged in (thx Robin Gloster)The callback order set in the config is not globally respectedAdded a default parameter to the storage context manager