class SlackSmartBot
def stop_using_rules_on(dest, user, from, channel, typem)
save_stats(__method__)
unless typem == :on_extended
if !is_admin?
respond "Only admins can extend or stop using the rules. Admins on this channel: #{config.admins}", dest
else
get_bots_created()
channel = @channels_name[channel] if @channels_name.key?(channel)
if @bots_created[@channel_id][:extended].include?(channel)
@bots_created[@channel_id][:extended].delete(channel)
update_bots_file()
respond "<@#{user.id}> removed the access to the rules of #{config.channel} from #{channel}.", @master_bot_id
if @channels_id[channel][0] == "G"
respond "The rules won't be accessible from *#{channel}* from now on.", dest
else
respond "The rules won't be accessible from *<##{@channels_id[channel]}>* from now on.", dest
end
respond "<@#{user.id}> removed the access to the rules of <##{@channel_id}> from this channel.", @channels_id[channel]
else
respond "The rules were not accessible from *#{channel}*", dest
end
end
end
end
end