@pagelines/sdk 1.0.879 → 1.0.881
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BotWrap.js +1 -1
- package/dist/BotWrap.js.map +1 -1
- package/package.json +1 -1
package/dist/BotWrap.js
CHANGED
|
@@ -445,7 +445,7 @@ var BotChatController = class extends a {
|
|
|
445
445
|
get chatUnavailableReason() {
|
|
446
446
|
if (this.chatEnabled) return;
|
|
447
447
|
let e = this._bot.displayName.value, t = this._bot.state.value.lifecycle;
|
|
448
|
-
return t === "starting" ? `${e} is waking up` : t === "
|
|
448
|
+
return t === "starting" ? `${e} is waking up` : t === "stopped" ? `${e} is asleep` : this._bot.desiredStatus.value === "active" ? `${e} is unavailable` : `${e} is offline`;
|
|
449
449
|
}
|
|
450
450
|
mapChatError(e) {
|
|
451
451
|
return e.includes("429") || e.includes("Too many") ? "Too many messages. Please wait a moment." : e.includes("503") || e.includes("not available") ? "Bot is currently offline." : e.includes("timed out") ? "This request timed out. Try again in a few minutes." : e.includes("starting up") ? "Bot is starting up. Please try again." : e.includes("404") ? "Bot not found." : e.includes("[no-reply]") ? "The reply didn't make it back. Refresh to see if it landed." : e.includes("[stream-open]") || e.includes("[stream-read]") ? "Lost connection mid-reply. Try again." : e.includes("[api]") ? "Couldn't send. Try again." : "Something went wrong. Try again.";
|