Skip to content

Commit 76b7121

Browse files
committed
update format
1 parent e12a9dd commit 76b7121

File tree

1 file changed

+26
-33
lines changed

1 file changed

+26
-33
lines changed

camel/bots/slack/slack_app.py

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,33 @@
3838

3939

4040
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.
4743
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+
"""
4868
@dependencies_required('slack_bolt')
4969
def __init__(
5070
self,
@@ -59,33 +79,6 @@ def __init__(
5979
socket_mode: bool = False,
6080
oauth_mode: bool = False,
6181
) -> 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-
"""
8982
from slack_bolt.adapter.socket_mode.async_handler import (
9083
AsyncSocketModeHandler,
9184
)

0 commit comments

Comments
 (0)