From 6a1050f667d7af633f5f85fffb8c28082b5cbae6 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Mon, 20 Jun 2022 12:35:56 -0500 Subject: [PATCH] docs: remove slack and use slackv3 --- docs/requirements.txt | 7 +- docs/user_guide/configuration/slack.rst | 90 ----------------------- docs/user_guide/configuration/slackv3.rst | 7 +- docs/user_guide/setup.rst | 1 - 4 files changed, 6 insertions(+), 99 deletions(-) delete mode 100644 docs/user_guide/configuration/slack.rst diff --git a/docs/requirements.txt b/docs/requirements.txt index 5d5c41869e..7c1d9d87b4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,10 +3,9 @@ sphinx>=1.2 sphinx-autodoc-annotation -e . -slixmpp +hypchat irc pyfire -python-telegram-bot -slackclient -hypchat pytest +python-telegram-bot +slixmpp diff --git a/docs/user_guide/configuration/slack.rst b/docs/user_guide/configuration/slack.rst deleted file mode 100644 index 3874d2b52d..0000000000 --- a/docs/user_guide/configuration/slack.rst +++ /dev/null @@ -1,90 +0,0 @@ -Slack backend configuration -=========================== - -This backend lets you connect to the -`Slack `_ messaging service. -To select this backend, -set `BACKEND = 'Slack'`. - -Extra Dependencies ------------------- - -You need to install this dependency before using Errbot with Slack:: - - pip install slackclient - -Account setup -------------- - -You will need to have an account at Slack for the bot to use, -either a bot account (recommended) or a regular user account. - -We will assume you're using a bot account for errbot, -which `may be created here `_. -Make note of the **API Token** you receive as you will need it next. - -With the bot account created on Slack, -you may configure the account in errbot -by setting up `BOT_IDENTITY` as follows:: - - BOT_IDENTITY = { - 'token': 'xoxb-4426949411-aEM7...', - } - - -Proxy setup -------------- - -In case you need to use a Proxy to connect to Slack, -you can set the proxies with the token config. - - BOT_IDENTITY = { - 'token': 'xoxb-4426949411-aEM7...', - 'proxies': {'http': 'some-http-proxy', 'https': 'some-https-proxy'} - } - - -Bot admins ----------- - -You can set `BOT_ADMINS` to configure which Slack users are bot administrators. -Make sure to include the `@` sign:: - - BOT_ADMINS = ('@gbin', '@zoni') - - -Bot mentions using @ --------------------- - -To enable using the bot's name in `BOT_ALT_PREFIXES` for @mentions in Slack, simply add the bot's name as follows:: - - BOT_ALT_PREFIXES = ('@botname',) - - -Channels/groups ---------------- - -If you're using a bot account you should set `CHATROOM_PRESENCE = ()`. -Bot accounts on Slack are not allowed to join/leave channels on their own -(they must be invited by a user instead) -so having any rooms setup in `CHATROOM_PRESENCE` will result in an error. - -If you are using a regular user account for the bot -then you can set `CHATROOM_PRESENCE` to a list of channels and groups to join. - -.. note:: - - You may leave the value for `CHATROOM_FN` at its default - as it is ignored by this backend. - - -Message size limit ------------------- - -As of the 12th August 2018 the Slack API has a message limit size of 40,000 characters. Messages -larger than 40,000 will be truncated by Slack's API. Errbot includes the functionality to split -messages larger than 40,000 characters into multiple parts. To reduce the message limit size, set the -`MESSAGE_SIZE_LIMIT` variable in the configuration file. Errbot will use the smallest value between -the default 40,000 and `MESSAGE_SIZE_LIMIT`. - -#MESSAGE_SIZE_LIMIT = 1000 diff --git a/docs/user_guide/configuration/slackv3.rst b/docs/user_guide/configuration/slackv3.rst index d7d796b768..a261d0e153 100644 --- a/docs/user_guide/configuration/slackv3.rst +++ b/docs/user_guide/configuration/slackv3.rst @@ -17,12 +17,10 @@ You need to install Slackv3 dependencies before using Errbot with Slack. In the it is assumed slackv3 has been download to the /opt/errbot/backends directory and errbot has been installed in a python virtual environment (adjust the command to your errbot's installation):: -.. code:: - + git clone https://github.com/errbotio/err-backend-slackv3.git source /opt/errbot/bin/activate /opt/errbot/bin/pip install -r /opt/errbot/backends/err-backend-slackv3/requirements.txt - Connection Methods ------------------ @@ -87,7 +85,7 @@ The virtual environment is created in `/opt/errbot/virtualenv` and errbot initia git clone https://github.com/errbotio/err-backend-slackv3 pip install -r /opt/errbot/backend/err-backend-slackv3/requirements.txt -5. Configure the slack bot token, signing secret (Events API with Request URLs) and/or app token (Events API with Socket-mode). Located in ``/opt/errbot/config.py`` +5. Configure the slack bot token, signing secret (Events API with Request URLs) and/or app token (Events API with Socket-mode). Located in `/opt/errbot/config.py` .. code:: @@ -97,6 +95,7 @@ The virtual environment is created in `/opt/errbot/virtualenv` and errbot initia 'app_token': "xapp-..." } + Setting up Slack application ---------------------------- diff --git a/docs/user_guide/setup.rst b/docs/user_guide/setup.rst index 9ad8b54893..0cbfcdc9cd 100644 --- a/docs/user_guide/setup.rst +++ b/docs/user_guide/setup.rst @@ -108,7 +108,6 @@ You can find here more details about configuring Errbot for some specific chat s configuration/gitter configuration/irc configuration/mattermost - configuration/slack configuration/slackv3 configuration/telegram configuration/xmpp