You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
5
5
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.
- In ``config.py`` make sure the correct backend is used.
25
25
::
26
26
27
-
BACKEND = 'SlackV3' # Or check errbot --list-backends for the exact name
27
+
BACKEND = 'SlackV3' # Or check errbot --list-backends for the exact name
28
28
29
29
- Configure tokens, the Bot Token (``xoxb-...``). If using Socket Mode, an App-Level Token is required (``xapp-...``).
30
30
::
@@ -35,7 +35,7 @@ Steps to Migrate
35
35
'app_token': 'xapp-YOUR-APP-LEVEL-TOKEN-HERE', # Needed for Socket Mode
36
36
}
37
37
38
-
2. Configure the Slack App (api.slack.com):
38
+
2. Configure the Slack App (api.slack.com)
39
39
- Go to the App's settings page on api.slack.com.
40
40
a. Enable Socket Mode:
41
41
- Navigate to "Settings" -> "Socket Mode".
@@ -62,24 +62,27 @@ Steps to Migrate
62
62
- ``message.im``: To receive direct messages sent to the bot.
63
63
- ``message.mpim``: To receive messages in group direct messages the bot is in.
64
64
- 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
+
66
67
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
+
67
69
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.
69
70
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``.
- Subscribe to Bot Events (app_mention, message.channels, message.groups, message.im, message.mpim).
78
81
- Reinstall the Slack App to apply scope/event changes.
79
82
- Ensure the bot user is a member of the relevant channel(s).
80
83
- Restart Errbot.
81
84
- Check logs for errors or received message events.
82
85
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.
84
87
85
88
Thanks to `grimesp <https://github.com/grimesp>`_ for supplying this migration guide.
0 commit comments