38
38
39
39
40
40
class SlackApp :
41
- r"""Represents a Slack app that is powered by a Slack Bolt `AsyncApp`.
42
- This class is responsible for initializing and managing the Slack
43
- application by setting up event handlers, running the app server, runting
44
- socket mode client, and handling events such as messages and mentions
45
- from Slack.
46
- """
41
+ r"""Initializes the SlackApp instance by setting up the Slack Bolt app
42
+ and configuring event handlers and OAuth settings.
47
43
44
+ Args:
45
+ oauth_token (str): Slack API token for authentication.
46
+ app_token (str, optional): Slack app token for authentication.
47
+ (default: :obj:`None`)
48
+ scopes (str, optional): Slack app scopes for permissions.
49
+ (default: :obj:`None`)
50
+ signing_secret (str, optional): Signing secret for verifying Slack
51
+ requests. (default: :obj:`None`)
52
+ client_id (str, optional): Slack app client ID. (default: :obj:`None`)
53
+ client_secret (str, optional): Slack app client secret.
54
+ (default: :obj:`None`)
55
+ redirect_uri_path (str, optional): The URI path for OAuth redirect.
56
+ (default: :str:`/slack/oauth_redirect`)
57
+ installation_store (AsyncInstallationStore, optional): The installation
58
+ store for handling OAuth installations. (default: :obj:`None`)
59
+ socket_mode (bool): A flag to enable socket mode for the Slack app
60
+ (default: :bool:`False`).
61
+ oauth_mode (bool): A flag to enable OAuth mode for the Slack app
62
+ (default: :bool:`False`).
63
+
64
+ Raises:
65
+ ValueError: If the `SLACK_OAUTH_TOKEN` and other required
66
+ parameters are not provided.
67
+ """
48
68
@dependencies_required ('slack_bolt' )
49
69
def __init__ (
50
70
self ,
@@ -59,33 +79,6 @@ def __init__(
59
79
socket_mode : bool = False ,
60
80
oauth_mode : bool = False ,
61
81
) -> None :
62
- r"""Initializes the SlackApp instance by setting up the Slack Bolt app
63
- and configuring event handlers and OAuth settings.
64
-
65
- Args:
66
- oauth_token (str): Slack API token for authentication.
67
- app_token (str, optional): Slack app token for authentication.
68
- (default: :obj:`None`)
69
- scopes (str, optional): Slack app scopes for permissions.
70
- (default: :obj:`None`)
71
- signing_secret (str, optional): Signing secret for verifying Slack
72
- requests. (default: :obj:`None`)
73
- client_id (str, optional): Slack app client ID. (default: :obj:`None`)
74
- client_secret (str, optional): Slack app client secret.
75
- (default: :obj:`None`)
76
- redirect_uri_path (str, optional): The URI path for OAuth redirect.
77
- (default: :str:`/slack/oauth_redirect`)
78
- installation_store (AsyncInstallationStore, optional): The installation
79
- store for handling OAuth installations. (default: :obj:`None`)
80
- socket_mode (bool): A flag to enable socket mode for the Slack app
81
- (default: :bool:`False`).
82
- oauth_mode (bool): A flag to enable OAuth mode for the Slack app
83
- (default: :bool:`False`).
84
-
85
- Raises:
86
- ValueError: If the `SLACK_OAUTH_TOKEN` and other required
87
- parameters are not provided.
88
- """
89
82
from slack_bolt .adapter .socket_mode .async_handler import (
90
83
AsyncSocketModeHandler ,
91
84
)
0 commit comments