Sha256: 7a213f9cf51717381bedfc3ed5770cb84845cc6f3d4e7bdf68c6bf7811652dd8
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
class SlackSmartBot # helpadmin: ---------------------------------------------- # helpadmin: `react to #CHANNEL_NAME THREAD_ID EMOJIS` # helpadmin: It will send the specified reactions as SmartBot # helpadmin: You can use this command only if you are a Master admin user and if you are in a private conversation with the bot # helpadmin: Examples: # helpadmin: _react to #sales 1622550707.012100 :thumbsup:_ # helpadmin: _react to #sales p1622550707012100 :thumbsup:_ # helpadmin: _react to #sales p1622550707012100 :thumbsup: :heavy_check_mark: :bathtub:_ # helpadmin: def react_to(dest, from, typem, to, thread_ts, emojis) save_stats(__method__) if config.masters.include?(from) and typem==:on_dm #master admin user succs = [] emojis.split(' ').each do |emoji| succs << (react emoji, thread_ts, to) end succs.uniq! if succs.size == 1 and succs[0] == true react :heavy_check_mark elsif succs.size == 2 react :exclamation else react :x end else respond "Only master admin users on a `pr`ivate conversation with the SmartBot can send reactions as SmartBot.", dest end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slack-smart-bot-1.10.0 | lib/slack/smart-bot/commands/on_bot/admin_master/react_to.rb |