Skip to content

Commit 57cb043

Browse files
committed
version 1.16.3
1 parent bf27882 commit 57cb043

File tree

13 files changed

+155
-12
lines changed

13 files changed

+155
-12
lines changed

docs/api-docs/slack_bolt/async_app.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,7 @@ <h2 id="returns">Returns</h2>
37983798
delete_original: Optional[bool] = None,
37993799
unfurl_links: Optional[bool] = None,
38003800
unfurl_media: Optional[bool] = None,
3801+
thread_ts: Optional[str] = None,
38013802
) -&gt; WebhookResponse:
38023803
if self.response_url is not None:
38033804
client = AsyncWebhookClient(
@@ -3816,6 +3817,7 @@ <h2 id="returns">Returns</h2>
38163817
delete_original=delete_original,
38173818
unfurl_links=unfurl_links,
38183819
unfurl_media=unfurl_media,
3820+
thread_ts=thread_ts,
38193821
)
38203822
return await client.send_dict(message)
38213823
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/async_respond.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
6262
delete_original: Optional[bool] = None,
6363
unfurl_links: Optional[bool] = None,
6464
unfurl_media: Optional[bool] = None,
65+
thread_ts: Optional[str] = None,
6566
) -&gt; WebhookResponse:
6667
if self.response_url is not None:
6768
client = AsyncWebhookClient(
@@ -80,6 +81,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
8081
delete_original=delete_original,
8182
unfurl_links=unfurl_links,
8283
unfurl_media=unfurl_media,
84+
thread_ts=thread_ts,
8385
)
8486
return await client.send_dict(message)
8587
elif isinstance(text_or_whole_response, dict):
@@ -137,6 +139,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
137139
delete_original: Optional[bool] = None,
138140
unfurl_links: Optional[bool] = None,
139141
unfurl_media: Optional[bool] = None,
142+
thread_ts: Optional[str] = None,
140143
) -&gt; WebhookResponse:
141144
if self.response_url is not None:
142145
client = AsyncWebhookClient(
@@ -155,6 +158,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
155158
delete_original=delete_original,
156159
unfurl_links=unfurl_links,
157160
unfurl_media=unfurl_media,
161+
thread_ts=thread_ts,
158162
)
159163
return await client.send_dict(message)
160164
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
9494
delete_original: Optional[bool] = None,
9595
unfurl_links: Optional[bool] = None,
9696
unfurl_media: Optional[bool] = None,
97+
thread_ts: Optional[str] = None,
9798
) -&gt; WebhookResponse:
9899
if self.response_url is not None:
99100
client = WebhookClient(
@@ -113,6 +114,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
113114
delete_original=delete_original,
114115
unfurl_links=unfurl_links,
115116
unfurl_media=unfurl_media,
117+
thread_ts=thread_ts,
116118
)
117119
return client.send_dict(message)
118120
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/internals.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
4343
delete_original: Optional[bool] = None,
4444
unfurl_links: Optional[bool] = None,
4545
unfurl_media: Optional[bool] = None,
46+
thread_ts: Optional[str] = None,
4647
) -&gt; Dict[str, Any]:
4748
message = {&#34;text&#34;: text}
4849
if blocks is not None and len(blocks) &gt; 0:
@@ -59,6 +60,8 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
5960
message[&#34;unfurl_links&#34;] = unfurl_links
6061
if unfurl_media is not None:
6162
message[&#34;unfurl_media&#34;] = unfurl_media
63+
if thread_ts is not None:
64+
message[&#34;thread_ts&#34;] = thread_ts
6265
return message</code></pre>
6366
</details>
6467
</section>

docs/api-docs/slack_bolt/context/respond/respond.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
6262
delete_original: Optional[bool] = None,
6363
unfurl_links: Optional[bool] = None,
6464
unfurl_media: Optional[bool] = None,
65+
thread_ts: Optional[str] = None,
6566
) -&gt; WebhookResponse:
6667
if self.response_url is not None:
6768
client = WebhookClient(
@@ -81,6 +82,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
8182
delete_original=delete_original,
8283
unfurl_links=unfurl_links,
8384
unfurl_media=unfurl_media,
85+
thread_ts=thread_ts,
8486
)
8587
return client.send_dict(message)
8688
elif isinstance(text_or_whole_response, dict):
@@ -137,6 +139,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
137139
delete_original: Optional[bool] = None,
138140
unfurl_links: Optional[bool] = None,
139141
unfurl_media: Optional[bool] = None,
142+
thread_ts: Optional[str] = None,
140143
) -&gt; WebhookResponse:
141144
if self.response_url is not None:
142145
client = WebhookClient(
@@ -156,6 +159,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
156159
delete_original=delete_original,
157160
unfurl_links=unfurl_links,
158161
unfurl_media=unfurl_media,
162+
thread_ts=thread_ts,
159163
)
160164
return client.send_dict(message)
161165
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,6 +2899,18 @@ <h2 id="args">Args</h2>
28992899
trigger_id=body["trigger_id"],
29002900
view={ ... }
29012901
)
2902+
</code></pre>
2903+
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
2904+
<pre><code>@app.action("link_button")
2905+
def handle_buttons(args):
2906+
args.logger.info(f"request body: {args.body}")
2907+
args.ack()
2908+
if args.context.channel_id is not None:
2909+
args.respond("Hi!")
2910+
args.client.views_open(
2911+
trigger_id=args.body["trigger_id"],
2912+
view={ ... }
2913+
)
29022914
</code></pre></div>
29032915
<details class="source">
29042916
<summary>
@@ -2919,6 +2931,19 @@ <h2 id="args">Args</h2>
29192931
view={ ... }
29202932
)
29212933

2934+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
2935+
2936+
@app.action(&#34;link_button&#34;)
2937+
def handle_buttons(args):
2938+
args.logger.info(f&#34;request body: {args.body}&#34;)
2939+
args.ack()
2940+
if args.context.channel_id is not None:
2941+
args.respond(&#34;Hi!&#34;)
2942+
args.client.views_open(
2943+
trigger_id=args.body[&#34;trigger_id&#34;],
2944+
view={ ... }
2945+
)
2946+
29222947
&#34;&#34;&#34;
29232948

29242949
client: WebClient
@@ -4059,6 +4084,7 @@ <h2 id="returns">Returns</h2>
40594084
delete_original: Optional[bool] = None,
40604085
unfurl_links: Optional[bool] = None,
40614086
unfurl_media: Optional[bool] = None,
4087+
thread_ts: Optional[str] = None,
40624088
) -&gt; WebhookResponse:
40634089
if self.response_url is not None:
40644090
client = WebhookClient(
@@ -4078,6 +4104,7 @@ <h2 id="returns">Returns</h2>
40784104
delete_original=delete_original,
40794105
unfurl_links=unfurl_links,
40804106
unfurl_media=unfurl_media,
4107+
thread_ts=thread_ts,
40814108
)
40824109
return client.send_dict(message)
40834110
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/kwargs_injection/args.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.args</code></h1>
5555
view={ ... }
5656
)
5757

58+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
59+
60+
@app.action(&#34;link_button&#34;)
61+
def handle_buttons(args):
62+
args.logger.info(f&#34;request body: {args.body}&#34;)
63+
args.ack()
64+
if args.context.channel_id is not None:
65+
args.respond(&#34;Hi!&#34;)
66+
args.client.views_open(
67+
trigger_id=args.body[&#34;trigger_id&#34;],
68+
view={ ... }
69+
)
70+
5871
&#34;&#34;&#34;
5972

6073
client: WebClient
@@ -178,6 +191,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
178191
trigger_id=body["trigger_id"],
179192
view={ ... }
180193
)
194+
</code></pre>
195+
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
196+
<pre><code>@app.action("link_button")
197+
def handle_buttons(args):
198+
args.logger.info(f"request body: {args.body}")
199+
args.ack()
200+
if args.context.channel_id is not None:
201+
args.respond("Hi!")
202+
args.client.views_open(
203+
trigger_id=args.body["trigger_id"],
204+
view={ ... }
205+
)
181206
</code></pre></div>
182207
<details class="source">
183208
<summary>
@@ -198,6 +223,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
198223
view={ ... }
199224
)
200225

226+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
227+
228+
@app.action(&#34;link_button&#34;)
229+
def handle_buttons(args):
230+
args.logger.info(f&#34;request body: {args.body}&#34;)
231+
args.ack()
232+
if args.context.channel_id is not None:
233+
args.respond(&#34;Hi!&#34;)
234+
args.client.views_open(
235+
trigger_id=args.body[&#34;trigger_id&#34;],
236+
view={ ... }
237+
)
238+
201239
&#34;&#34;&#34;
202240

203241
client: WebClient

docs/api-docs/slack_bolt/kwargs_injection/async_args.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_args</code></h1
5454
view={ ... }
5555
)
5656

57+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
58+
59+
@app.action(&#34;link_button&#34;)
60+
async def handle_buttons(args):
61+
args.logger.info(f&#34;request body: {args.body}&#34;)
62+
await args.ack()
63+
if args.context.channel_id is not None:
64+
await args.respond(&#34;Hi!&#34;)
65+
await args.client.views_open(
66+
trigger_id=args.body[&#34;trigger_id&#34;],
67+
view={ ... }
68+
)
69+
5770
&#34;&#34;&#34;
5871

5972
logger: Logger
@@ -174,6 +187,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
174187
trigger_id=body["trigger_id"],
175188
view={ ... }
176189
)
190+
</code></pre>
191+
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
192+
<pre><code>@app.action("link_button")
193+
async def handle_buttons(args):
194+
args.logger.info(f"request body: {args.body}")
195+
await args.ack()
196+
if args.context.channel_id is not None:
197+
await args.respond("Hi!")
198+
await args.client.views_open(
199+
trigger_id=args.body["trigger_id"],
200+
view={ ... }
201+
)
177202
</code></pre></div>
178203
<details class="source">
179204
<summary>
@@ -194,6 +219,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
194219
view={ ... }
195220
)
196221

222+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
223+
224+
@app.action(&#34;link_button&#34;)
225+
async def handle_buttons(args):
226+
args.logger.info(f&#34;request body: {args.body}&#34;)
227+
await args.ack()
228+
if args.context.channel_id is not None:
229+
await args.respond(&#34;Hi!&#34;)
230+
await args.client.views_open(
231+
trigger_id=args.body[&#34;trigger_id&#34;],
232+
view={ ... }
233+
)
234+
197235
&#34;&#34;&#34;
198236

199237
logger: Logger

docs/api-docs/slack_bolt/kwargs_injection/async_utils.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_utils</code></h
111111
first_arg_name = required_arg_names[0]
112112
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
113113
required_arg_names.pop(0)
114-
elif first_arg_name not in all_available_args.keys():
114+
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
115115
if this_func is None:
116116
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
117117
required_arg_names.pop(0)
@@ -128,7 +128,7 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_utils</code></h
128128
else:
129129
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)
130130

131-
if name not in found_arg_names:
131+
elif name not in found_arg_names:
132132
logger.warning(f&#34;{name} is not a valid argument&#34;)
133133
kwargs[name] = None
134134
return kwargs</code></pre>
@@ -214,7 +214,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
214214
first_arg_name = required_arg_names[0]
215215
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
216216
required_arg_names.pop(0)
217-
elif first_arg_name not in all_available_args.keys():
217+
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
218218
if this_func is None:
219219
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
220220
required_arg_names.pop(0)
@@ -231,7 +231,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
231231
else:
232232
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)
233233

234-
if name not in found_arg_names:
234+
elif name not in found_arg_names:
235235
logger.warning(f&#34;{name} is not a valid argument&#34;)
236236
kwargs[name] = None
237237
return kwargs</code></pre>

docs/api-docs/slack_bolt/kwargs_injection/index.html

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
144144
first_arg_name = required_arg_names[0]
145145
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
146146
required_arg_names.pop(0)
147-
elif first_arg_name not in all_available_args.keys():
147+
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
148148
if this_func is None:
149149
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
150150
required_arg_names.pop(0)
@@ -161,7 +161,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
161161
else:
162162
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)
163163

164-
if name not in found_arg_names:
164+
elif name not in found_arg_names:
165165
logger.warning(f&#34;{name} is not a valid argument&#34;)
166166
kwargs[name] = None
167167
return kwargs</code></pre>
@@ -189,6 +189,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
189189
trigger_id=body["trigger_id"],
190190
view={ ... }
191191
)
192+
</code></pre>
193+
<p>Alternatively, you can include a parameter named <code><a title="slack_bolt.kwargs_injection.args" href="args.html">slack_bolt.kwargs_injection.args</a></code> and it will be injected with an instance of this class.</p>
194+
<pre><code>@app.action("link_button")
195+
def handle_buttons(args):
196+
args.logger.info(f"request body: {args.body}")
197+
args.ack()
198+
if args.context.channel_id is not None:
199+
args.respond("Hi!")
200+
args.client.views_open(
201+
trigger_id=args.body["trigger_id"],
202+
view={ ... }
203+
)
192204
</code></pre></div>
193205
<details class="source">
194206
<summary>
@@ -209,6 +221,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
209221
view={ ... }
210222
)
211223

224+
Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.
225+
226+
@app.action(&#34;link_button&#34;)
227+
def handle_buttons(args):
228+
args.logger.info(f&#34;request body: {args.body}&#34;)
229+
args.ack()
230+
if args.context.channel_id is not None:
231+
args.respond(&#34;Hi!&#34;)
232+
args.client.views_open(
233+
trigger_id=args.body[&#34;trigger_id&#34;],
234+
view={ ... }
235+
)
236+
212237
&#34;&#34;&#34;
213238

214239
client: WebClient

0 commit comments

Comments
 (0)