We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05a4284 commit c6ded54Copy full SHA for c6ded54
1 file changed
Parsers/Generate an AI image.js
@@ -52,8 +52,23 @@ if (dalleResponseStatusCode != 200) {
52
var cloudinaryResponse = cloudinary.execute();
53
var cloudinaryResponseBody = JSON.parse(cloudinaryResponse.getBody());
54
55
- if (cloudinaryResponseBody.url) {
56
- new x_snc_slackerbot.Slacker().send_chat(current, "<" + cloudinaryResponseBody.url + "|" + prompt + ">\n");
+ var message = {
+ "blocks": [
57
+ {
58
+ "type": "image",
59
+ "title": {
60
+ "type": "plain_text",
61
+ "text": prompt
62
+ },
63
+ "block_id": "image4",
64
+ "image_url": cloudinaryResponseBody.url,
65
+ "alt_text": prompt
66
+ }
67
+ ]
68
69
+
70
+ if (cloudinaryResponseBody.url) {
71
+ new x_snc_slackerbot.Slacker().send_chat(current, message);
72
} else {
73
new x_snc_slackerbot.Slacker().send_chat(current, failureMessage);
74
}
0 commit comments