socketmode example: use embedded api client in socketmode client #1164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The socketmode example in its current version is confusing for new users. Although a new socketmode client embeds the provided api client into itself, thus inheriting all methods, the example uses the earlier defined api to call said command. This gives the impression that you need to still keep the original client.
One could even go further by creating the api inline with the socketmode client.
To be honest, elaborating a bit more on the socketmode example would be helpful (or at least would've been helpful to me when I first started using it), but that's out of scope for this tiny PR.
Also, accidentally fixed a small formatting error.