Für Support- und Team-Chat-Bots
Anschauliche Antworten in Chats, die keine Skripte ausführen
Team-Chats und Support-Widgets zeigen oft nur Text und Bilder. Lassen Sie sich von WebKnox ein Bild der Karte geben und posten Sie es neben der Textantwort.
15° and partly cloudy in Dresden right now. Light rain starts around 8 pm and gets heavier after 10 pm.
15° and partly cloudy in Dresden right now. Light rain starts around 8 pm and gets heavier after 10 pm; it eases off by about 7 am, and Thursday stays mostly dry with a high of 12°.
Nur Text oder Text mit Karte
A medium banana (118 g) has about 105 kcal, mostly from carbohydrates: 27 g, including 14 g of sugars. It also gives you 3.1 g of fiber and 422 mg of potassium.
Wo es in einen Bot passt
Ihr Bot empfängt die Nachricht ohnehin. Ein Aufruf liefert den Text und einen Link zum Bild.
- Jemand fragtin einem Kanal oder einem Support-Chat
- Ihr Botfragt WebKnox zusätzlich nach einem Bild
- matched: trueden Text mit dem Bild im Anhang posten
- matched: falseIhr Bot antwortet wie gewohnt
// Ask for a hosted image along with the answer body: JSON.stringify({ messages, render: { formats: ['image'] } }) if (answer.matched) { // Post the text, with the card as an image await chat.postMessage({ text: answer.text, attachments: [{ image_url: answer.render.image_url }], }); } else { await chat.postMessage({ text: await myBot.reply(messages) }); }
Gut zu wissen für Bots
Bild-Links laufen ab
Ein Bild-Link funktioniert bis render.expires_at. Laden Sie das Bild auf die Plattform hoch, wenn eine Nachricht es länger behalten soll.
Der Text bleibt die Antwort
Posten Sie immer auch text: Dieser Text ist durchsuchbar, und Screenreader lesen ihn vor.
Mit Pro und Scale
Gehostete Bilder gibt es in Pro und Scale; jedes kostet einen zusätzlichen Token.