Skip to content

Commit 8e9b22b

Browse files
authored
legacy_migration documentation fixup
1 parent 7f02cb5 commit 8e9b22b

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

docs/legacy_migration.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Legacy/Classic token migration
22
========================================================================
33

4-
Slack annonced the `deprecation of legacy bot access <https://api.slack.com/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation>`_ beginning 31st March 2025. For needing guidance to get their Errbot configuration migrated, here are is the produced used by a community member:
4+
Slack annonced the `deprecation of legacy bot access <https://api.slack.com/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation>`_ beginning 31st March 2025. For people needing guidance to get their Errbot configuration migrated, here are is the procedure supplied by a community member.
55

6-
When migrating from the legacy Slack RTM API to the Events API or Socket Mode, which Errbot's SlackV3 backend uses, the core problem is that the way the bot receives messages has fundamentally changed.
6+
When migrating from the legacy Slack RTM API to the Events API or Socket Mode, which Errbot's SlackV3 backend supports all three, the core problem is that the way the bot receives messages has fundamentally changed.
77

88
Understanding what's changing
99
------------------------------------------------------------------------
@@ -24,7 +24,7 @@ Steps to Migrate
2424
- In ``config.py`` make sure the correct backend is used.
2525
::
2626

27-
BACKEND = 'SlackV3' # Or check errbot --list-backends for the exact name
27+
BACKEND = 'SlackV3' # Or check errbot --list-backends for the exact name
2828

2929
- Configure tokens, the Bot Token (``xoxb-...``). If using Socket Mode, an App-Level Token is required (``xapp-...``).
3030
::
@@ -35,7 +35,7 @@ Steps to Migrate
3535
'app_token': 'xapp-YOUR-APP-LEVEL-TOKEN-HERE', # Needed for Socket Mode
3636
}
3737

38-
2. Configure the Slack App (api.slack.com):
38+
2. Configure the Slack App (api.slack.com)
3939
- Go to the App's settings page on api.slack.com.
4040
a. Enable Socket Mode:
4141
- Navigate to "Settings" -> "Socket Mode".
@@ -62,24 +62,27 @@ Steps to Migrate
6262
- ``message.im``: To receive direct messages sent to the bot.
6363
- ``message.mpim``: To receive messages in group direct messages the bot is in.
6464
- Crucially, without the ``message.*`` events, your bot will not see regular messages like ``!status`` unless they also ``@mention`` the bot.
65-
◦ d. Reinstall App: After changing Scopes or Event Subscriptions, you must reinstall your app into your workspace. Go back to "Settings" -> "Install App" and click "Reinstall to Workspace" (or "Install to Workspace" if it's the first time after changes). Follow the prompts.
65+
d. Reinstall App: After changing Scopes or Event Subscriptions, you must reinstall your app into your workspace. Go back to "Settings" -> "Install App" and click "Reinstall to Workspace" (or "Install to Workspace" if it's the first time after changes). Follow the prompts.
66+
6667
3. Ensure Bot is in the Channel: Double-check that your bot user has actually been invited to and joined the channel where you are typing the ``!status`` command.
68+
6769
4. Restart Errbot: After updating ``config.py`` and your Slack App settings (including reinstalling), restart your Errbot process.
68-
5. Check Logs: Increase Errbot's log level in ``config.py`` (``BOT_LOG_LEVEL = logging.DEBUG``) and restart. Check the logs when you send a ``!status`` command. You should see evidence of the message event being received if the subscriptions are correct. If you see the message event but Errbot doesn't react, check your BOT_PREFIX setting in config.py.
6970

70-
Checklist:
71+
5. Check Logs: Increase Errbot's log level in ``config.py`` (``BOT_LOG_LEVEL = logging.DEBUG``) and restart. Check the logs when you send a ``!status`` command. You should see evidence of the message event being received if the subscriptions are correct. If you see the message event but Errbot doesn't react, check your ``BOT_PREFIX`` setting in ``config.py``.
72+
73+
Checklist
7174
------------------------------------------------------------------------
7275

7376
- Use the correct Errbot backend (SlackV3 or similar) in config.py.
7477
- Provide both ``xoxb-`` (Bot Token) and ``xapp-`` (App-Level Token) in BOT_IDENTITY.
7578
- Enable Socket Mode in Slack App settings.
76-
- Add necessary OAuth Scopes (chat:write, channels:history, groups:history, im:history, mpim:history, etc.).
79+
- Add necessary OAuth Scopes (``chat:write``, ``channels:history``, ``groups:history``, ``im:history``, ``mpim:history``, etc.).
7780
- Subscribe to Bot Events (app_mention, message.channels, message.groups, message.im, message.mpim).
7881
- Reinstall the Slack App to apply scope/event changes.
7982
- Ensure the bot user is a member of the relevant channel(s).
8083
- Restart Errbot.
8184
- Check logs for errors or received message events.
8285

83-
Following these steps, particularly ensuring the correct Event Subscriptions (message.*) are active and the app is reinstalled, should get your Errbot responding to commands again.
86+
Following these steps, particularly ensuring the correct Event Subscriptions (``message.*``) are active and the app is reinstalled, should get your Errbot responding to commands again.
8487

8588
Thanks to `grimesp <https://github.com/grimesp>`_ for supplying this migration guide.

0 commit comments

Comments
 (0)