Skip to content

Commit

Permalink
version 1.16.3
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Mar 8, 2023
1 parent bf27882 commit 57cb043
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/api-docs/slack_bolt/async_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3798,6 +3798,7 @@ <h2 id="returns">Returns</h2>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -3816,6 +3817,7 @@ <h2 id="returns">Returns</h2>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
4 changes: 4 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/async_respond.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -80,6 +81,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down Expand Up @@ -137,6 +139,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -155,6 +158,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
2 changes: 2 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -113,6 +114,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
3 changes: 3 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/internals.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; Dict[str, Any]:
message = {&#34;text&#34;: text}
if blocks is not None and len(blocks) &gt; 0:
Expand All @@ -59,6 +60,8 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
message[&#34;unfurl_links&#34;] = unfurl_links
if unfurl_media is not None:
message[&#34;unfurl_media&#34;] = unfurl_media
if thread_ts is not None:
message[&#34;thread_ts&#34;] = thread_ts
return message</code></pre>
</details>
</section>
Expand Down
4 changes: 4 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/respond.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -81,6 +82,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down Expand Up @@ -137,6 +139,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -156,6 +159,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
27 changes: 27 additions & 0 deletions docs/api-docs/slack_bolt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2899,6 +2899,18 @@ <h2 id="args">Args</h2>
trigger_id=body["trigger_id"],
view={ ... }
)
</code></pre>
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
<pre><code>@app.action("link_button")
def handle_buttons(args):
args.logger.info(f"request body: {args.body}")
args.ack()
if args.context.channel_id is not None:
args.respond("Hi!")
args.client.views_open(
trigger_id=args.body["trigger_id"],
view={ ... }
)
</code></pre></div>
<details class="source">
<summary>
Expand All @@ -2919,6 +2931,19 @@ <h2 id="args">Args</h2>
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
args.ack()
if args.context.channel_id is not None:
args.respond(&#34;Hi!&#34;)
args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

client: WebClient
Expand Down Expand Up @@ -4059,6 +4084,7 @@ <h2 id="returns">Returns</h2>
delete_original: Optional[bool] = None,
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -4078,6 +4104,7 @@ <h2 id="returns">Returns</h2>
delete_original=delete_original,
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
38 changes: 38 additions & 0 deletions docs/api-docs/slack_bolt/kwargs_injection/args.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.args</code></h1>
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
args.ack()
if args.context.channel_id is not None:
args.respond(&#34;Hi!&#34;)
args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

client: WebClient
Expand Down Expand Up @@ -178,6 +191,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
trigger_id=body["trigger_id"],
view={ ... }
)
</code></pre>
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
<pre><code>@app.action("link_button")
def handle_buttons(args):
args.logger.info(f"request body: {args.body}")
args.ack()
if args.context.channel_id is not None:
args.respond("Hi!")
args.client.views_open(
trigger_id=args.body["trigger_id"],
view={ ... }
)
</code></pre></div>
<details class="source">
<summary>
Expand All @@ -198,6 +223,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
args.ack()
if args.context.channel_id is not None:
args.respond(&#34;Hi!&#34;)
args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

client: WebClient
Expand Down
38 changes: 38 additions & 0 deletions docs/api-docs/slack_bolt/kwargs_injection/async_args.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_args</code></h1
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
async def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
await args.ack()
if args.context.channel_id is not None:
await args.respond(&#34;Hi!&#34;)
await args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

logger: Logger
Expand Down Expand Up @@ -174,6 +187,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
trigger_id=body["trigger_id"],
view={ ... }
)
</code></pre>
<p>Alternatively, you can include a parameter named <code>args</code> and it will be injected with an instance of this class.</p>
<pre><code>@app.action("link_button")
async def handle_buttons(args):
args.logger.info(f"request body: {args.body}")
await args.ack()
if args.context.channel_id is not None:
await args.respond("Hi!")
await args.client.views_open(
trigger_id=args.body["trigger_id"],
view={ ... }
)
</code></pre></div>
<details class="source">
<summary>
Expand All @@ -194,6 +219,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
async def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
await args.ack()
if args.context.channel_id is not None:
await args.respond(&#34;Hi!&#34;)
await args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

logger: Logger
Expand Down
8 changes: 4 additions & 4 deletions docs/api-docs/slack_bolt/kwargs_injection/async_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_utils</code></h
first_arg_name = required_arg_names[0]
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
required_arg_names.pop(0)
elif first_arg_name not in all_available_args.keys():
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
if this_func is None:
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
required_arg_names.pop(0)
Expand All @@ -128,7 +128,7 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.async_utils</code></h
else:
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)

if name not in found_arg_names:
elif name not in found_arg_names:
logger.warning(f&#34;{name} is not a valid argument&#34;)
kwargs[name] = None
return kwargs</code></pre>
Expand Down Expand Up @@ -214,7 +214,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
first_arg_name = required_arg_names[0]
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
required_arg_names.pop(0)
elif first_arg_name not in all_available_args.keys():
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
if this_func is None:
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
required_arg_names.pop(0)
Expand All @@ -231,7 +231,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
else:
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)

if name not in found_arg_names:
elif name not in found_arg_names:
logger.warning(f&#34;{name} is not a valid argument&#34;)
kwargs[name] = None
return kwargs</code></pre>
Expand Down
29 changes: 27 additions & 2 deletions docs/api-docs/slack_bolt/kwargs_injection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
first_arg_name = required_arg_names[0]
if first_arg_name in {&#34;self&#34;, &#34;cls&#34;}:
required_arg_names.pop(0)
elif first_arg_name not in all_available_args.keys():
elif first_arg_name not in all_available_args.keys() and first_arg_name != &#34;args&#34;:
if this_func is None:
logger.warning(warning_skip_uncommon_arg_name(first_arg_name))
required_arg_names.pop(0)
Expand All @@ -161,7 +161,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
else:
logger.warning(f&#34;Unknown Request object type detected ({type(request)})&#34;)

if name not in found_arg_names:
elif name not in found_arg_names:
logger.warning(f&#34;{name} is not a valid argument&#34;)
kwargs[name] = None
return kwargs</code></pre>
Expand Down Expand Up @@ -189,6 +189,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
trigger_id=body["trigger_id"],
view={ ... }
)
</code></pre>
<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>
<pre><code>@app.action("link_button")
def handle_buttons(args):
args.logger.info(f"request body: {args.body}")
args.ack()
if args.context.channel_id is not None:
args.respond("Hi!")
args.client.views_open(
trigger_id=args.body["trigger_id"],
view={ ... }
)
</code></pre></div>
<details class="source">
<summary>
Expand All @@ -209,6 +221,19 @@ <h2 class="section-title" id="header-classes">Classes</h2>
view={ ... }
)

Alternatively, you can include a parameter named `args` and it will be injected with an instance of this class.

@app.action(&#34;link_button&#34;)
def handle_buttons(args):
args.logger.info(f&#34;request body: {args.body}&#34;)
args.ack()
if args.context.channel_id is not None:
args.respond(&#34;Hi!&#34;)
args.client.views_open(
trigger_id=args.body[&#34;trigger_id&#34;],
view={ ... }
)

&#34;&#34;&#34;

client: WebClient
Expand Down
Loading

0 comments on commit 57cb043

Please sign in to comment.