Sha256: 34c0c8091783f400936669f840175b7b99bcb0d1bc63e6705c28c40541df08a4
Contents?: true
Size: 936 Bytes
Versions: 5
Compression:
Stored size: 936 Bytes
Contents
# frozen_string_literal: true module SlackRubyBotServer module Events module Api module Endpoints module Slack class CommandsEndpoint < Grape::API desc 'Respond to slash commands.' params do requires :command, type: String requires :text, type: String requires :token, type: String requires :user_id, type: String requires :channel_id, type: String requires :channel_name, type: String requires :team_id, type: String end post '/command' do command = SlackRubyBotServer::Events::Requests::Command.new(params, request) command_name = command[:command] SlackRubyBotServer::Events.config.run_callbacks(:command, command_name, command) || body(false) end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems