mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 00:05:39 +08:00
12 lines
290 B
Ruby
12 lines
290 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseNarrativeBot
|
|
class Magic8Ball
|
|
def self.generate_answer
|
|
I18n.t(
|
|
"discourse_narrative_bot.magic_8_ball.result",
|
|
result: I18n.t("discourse_narrative_bot.magic_8_ball.answers.#{rand(1..20)}"),
|
|
)
|
|
end
|
|
end
|
|
end
|