lib/slack/smart-bot/commands/general/use_rules.rb in slack-smart-bot-1.0.2 vs lib/slack/smart-bot/commands/general/use_rules.rb in slack-smart-bot-1.1.0
- old
+ new
@@ -19,11 +19,11 @@
channel_found = channels.detect { |c| c.name == channel }
members = client.web_client.conversations_members(channel: @channels_id[channel]).members unless channel_found.nil?
if channel_found.nil?
respond "The channel you are trying to use doesn't exist", dest
- elsif channel_found.name == MASTER_CHANNEL
+ elsif channel_found.name == config.master_channel
respond "You cannot use the rules from Master Channel on any other channel.", dest
elsif !@bots_created.key?(@channels_id[channel])
respond "There is no bot running on that channel.", dest
elsif @bots_created.key?(@channels_id[channel]) and @bots_created[@channels_id[channel]][:status] != :on
respond "The bot in that channel is not :on", dest
@@ -33,10 +33,10 @@
if dest[0] == "C" or dest[0] == "G" #todo: take in consideration bots that are not master
@rules_imported[user.id][dchannel] = channel_found.id
else
@rules_imported[user.id][user.id] = channel_found.id
end
- update_rules_imported() if ON_MASTER_BOT
+ update_rules_imported() if config.on_master_bot
respond "I'm using now the rules from <##{channel_found.id}>", dest
def git_project() "" end
def project_folder() "" end
else