Class: Slk::Commands::Search
Overview
Searches messages across channels and DMs Note: Requires user tokens (xoxc/xoxs), NOT bot tokens (xoxb) rubocop:disable Metrics/ClassLength
Instance Attribute Summary
Attributes inherited from Base
#options, #positional_args, #runner
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Slk::Commands::Base
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/slk/commands/search.rb', line 11 def execute result = return result if result query = positional_args.first return missing_query_error unless query search_and_display(query) rescue ApiError => e handle_api_error(e) rescue ArgumentError => e error(e.) 1 end |