Refactor `search_answer` to be dynamically inserted so it can be changed

Refactor search_answer to be dynamically inserted so it can be changed

diff --git a/plugins/discourse-narrative-bot/config/locales/server.en.yml b/plugins/discourse-narrative-bot/config/locales/server.en.yml
index 5163997e31..f0d54c7f55 100644
--- a/plugins/discourse-narrative-bot/config/locales/server.en.yml
+++ b/plugins/discourse-narrative-bot/config/locales/server.en.yml
@@ -293,7 +293,7 @@ en:
 
           <img src="%{base_uri}/plugins/discourse-narrative-bot/images/capybara-eating.gif"/>
 
-          Did you notice you’re now back at the beginning? Feed this poor hungry capybara by **replying with the `:herb:` emoji** and you’ll be automatically taken to the end.
+          Did you notice you’re now back at the beginning? Feed this poor hungry capybara by **replying with the `%{search_answer}` emoji** and you’ll be automatically taken to the end.
         reply: |-
           Yay you found it :tada:
 
diff --git a/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb b/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb
index df134ac42d..f85854c32d 100644
--- a/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb
+++ b/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb
@@ -117,7 +117,9 @@ module DiscourseNarrativeBot
       }
     }
 
-    SEARCH_ANSWER = ':herb:'.freeze
+    def self.search_answer
+      ':herb:'
+    end
 
     def self.reset_trigger
       I18n.t('discourse_narrative_bot.new_user_narrative.reset_trigger')
@@ -152,7 +154,7 @@ module DiscourseNarrativeBot
       raw = <<~RAW
       #{post.raw}
 
-      #{I18n.t("#{I18N_KEY}.search.hidden_message", i18n_post_args)}
+      #{I18n.t("#{I18N_KEY}.search.hidden_message", i18n_post_args.merge(search_answer: NewUserNarrative.search_answer))}
       RAW
 
       PostRevisor.new(post, topic).revise!(
@@ -495,7 +497,7 @@ module DiscourseNarrativeBot
       post_topic_id = @post.topic_id
       return unless valid_topic?(post_topic_id)
 
-      if @post.raw.match(/#{SEARCH_ANSWER}/)
+      if @post.raw.match(/#{NewUserNarrative.search_answer}/)
         fake_delay
         reply_to(@post, I18n.t("#{I18N_KEY}.search.reply", i18n_post_args(search_url: url_helpers(:search_url))))
       else
diff --git a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb
index 1b35acd3d8..b7c5ec34d4 100644
--- a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb
+++ b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb
@@ -946,7 +946,9 @@ describe DiscourseNarrativeBot::NewUserNarrative do
           expect(narrative.get_data(user)[:state].to_sym).to eq(:tutorial_search)
 
           expect(post.reload.topic.first_post.raw).to include(I18n.t(
-            "discourse_narrative_bot.new_user_narrative.search.hidden_message", base_uri: ''
+            "discourse_narrative_bot.new_user_narrative.search.hidden_message",
+            base_uri: '',
+            search_answer: described_class.search_answer
           ))
         end
 
@@ -963,7 +965,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
 
         it 'should create the right reply' do
           post.update!(
-            raw: "#{described_class::SEARCH_ANSWER} this is a capybara"
+            raw: "#{described_class.search_answer} this is a capybara"
           )
 
           expect do

GitHub sha: 74207ef0