mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
UX: Let users know they disabled discobot and they can't interact with it. (#12534)
Discobot will reply to users they need to enable onboarding tips to interact with them when issued a command.
This commit is contained in:
@ -126,7 +126,9 @@ module DiscourseNarrativeBot
|
||||
|
||||
def bot_commands(hint = true)
|
||||
raw =
|
||||
if match_data = match_trigger?("#{self.class.dice_trigger} (\\d+)d(\\d+)")
|
||||
if @user.manually_disabled_discobot?
|
||||
I18n.t(self.class.i18n_key('random_mention.discobot_disabled'))
|
||||
elsif match_data = match_trigger?("#{self.class.dice_trigger} (\\d+)d(\\d+)")
|
||||
DiscourseNarrativeBot::Dice.roll(match_data[1].to_i, match_data[2].to_i)
|
||||
elsif match_trigger?(self.class.quote_trigger)
|
||||
DiscourseNarrativeBot::QuoteGenerator.generate(@user)
|
||||
|
Reference in New Issue
Block a user