From 3eb2835460ad29aee77e06fc7d0439cfe8b5d94a Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Wed, 17 May 2023 14:25:17 +0300 Subject: [PATCH] Fix narrator message type error --- public/script.js | 1 + public/scripts/slash-commands.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index 5572e796d..677918eb5 100644 --- a/public/script.js +++ b/public/script.js @@ -275,6 +275,7 @@ const system_message_types = { GENERIC: "generic", BOOKMARK_CREATED: "bookmark_created", BOOKMARK_BACK: "bookmark_back", + NARRATOR: "narrator", }; const extension_prompt_types = { diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 5f5f2e62b..421c7f658 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -87,7 +87,6 @@ function sendNarratorMessage(_, text) { } const message = { - extra: {}, name: 'Narrator', is_user: false, is_name: false, @@ -95,9 +94,11 @@ function sendNarratorMessage(_, text) { send_date: humanizedDateTime(), mes: text.trim(), force_avatar: system_avatar, - type + extra: { + type: system_message_types.NARRATOR, + }, }; - + chat.push(message); addOneMessage(message); }