Sha256: 47247caa040c941f66c9da0e1f170c53644d6545ff2c296c2cfac61c8eb02a3b

Contents?: true

Size: 537 Bytes

Versions: 18

Compression:

Stored size: 537 Bytes

Contents

class SlackSmartBot

  def bye_bot(dest, from, display_name)
    if @status == :on
      save_stats(__method__)
      bye = ["Bye", "Bæ", "Good Bye", "Adiós", "Ciao", "Bless", "Bless bless", "Adeu"].sample
      respond "#{bye} #{display_name}", dest

      if @listening.key?(from)
        if Thread.current[:on_thread]
          @listening[from].delete(Thread.current[:thread_ts])
        else
          @listening[from].delete(dest)
        end
        @listening.delete(from) if @listening[from].empty?
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
slack-smart-bot-1.14.2 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.14.1 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.14.0 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.13.2 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.13.1 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.13.0 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.9 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.8 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.7 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.6 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.5 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.4 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.3 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.2 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.1 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.12.0 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.11.0 lib/slack/smart-bot/commands/general/bye_bot.rb
slack-smart-bot-1.10.0 lib/slack/smart-bot/commands/general/bye_bot.rb